Private Sub Command1_Click()
If Text1.Text <> "" Then
MsgBox check(Trim(Text1.Text))
Else
MsgBox "不为空!"
End If
End Sub
Private Function check(ByVal st As String) As Boolean
Dim R As String
R = Trim(Str(st))
If R = StrReverse(R) Then
check = True '函数 返回 true
Else
check = False '函数 返回 false
End If
End Function