Option Explicit
Private Sub Command1_Click()
Dim str As String
str = Text1.Text
Text2.Text = ReversString(str)
End Sub
Private Function ReversString(str As String) As String
ReversString = StrReverse(str)
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''' another function ''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Sub Command1_Click()
Dim str As String
str = Text1.Text
Text2.Text = ReversString(str)
End Sub
Public Function ReversString(ByVal InputString As String) _
As String
Dim lLen As Long, lCtr As Long
Dim sChar As String
Dim sAns As String
lLen = Len(InputString)
For lCtr = lLen To 1 Step -1
sChar = Mid(InputString, lCtr, 1)
sAns = sAns & sChar
Next
ReversString = sAns
End Function