'Den här koden ska ligga det formulär du använder funktionen i.
Public Function reversestring(revstr As String) As String
' revstr: String to reverse
' Returns: The reverse string
Dim doreverse As Long
reversestring = ""
For doreverse = Len(revstr) To 1 Step -1
reversestring = reversestring & Mid$(revstr, doreverse, 1)
Next
End Function
'Lägg den här koden i en CommandButton
Dim strResult As String
strResult = reversestring(Text1.Text)
MsgBox strResult