程序代码:
Private Sub Command1_Click()
Dim bo, ba, st As String
st = Text1.Text
bo = st Like "[a-z]"
ba = st Like "[A-Z]"
If IsNumeric(st) Then
MsgBox "输入的是数字", vbOKOnly, "信息提示"
ElseIf bo Then
MsgBox "输入的是小写字母", vbOKOnly, "信息提示"
ElseIf ba Then
MsgBox "输入的是大写字母", vbOKOnly, "信息提示"
Else
MsgBox "输入的既不是数字也不是字母", vbOKOnly, "信息提示"
End If
End Sub