如图:
代码如下:
Sub test()
Dim sr As String
sr = InputBox("请输入一个字符")
If Asc(sr) >= "a" And Asc(sr) <= "z" Then
MsgBox "您输入的是小写字母"
ElseIf Asc(sr) >= "A" And Asc(sr) <= "Z" Then
MsgBox "您输入的是大写字母"
ElseIf Asc(sr) >= "0" And Asc(sr) <= "9" Then
MsgBox "您输入的是数字"
Else
MsgBox "您输入的是其他字符"
End If
End Sub