Private Sub Command1_Click()
Dim n As Long
n = Val(InputBox("请输入一个数!"))
If Trim(Str(n)) = Trim(StrReverse(n)) Then
MsgBox n & "是回文数!"
Else
MsgBox n & "不是回文数!"
End If
End Sub
Private Sub Command1_Click()
Text1.Text=Trim(Text1.Text)
If IsNumeric(Text1.Text) Then
If Text1.Text = StrReverse(Text1.Text) Then
MsgBox Text1.Text & " 是回文数。"
Else
MsgBox Text1.Text & " 不是回文数。"
End If
Else
MsgBox Text1.Text & " 不是一个数字。"
End If
End Sub