vb写程序输入一个字符,判断是数字字符?大小字母?其他字符?
2个回答
展开全部
If Asc(Text1.Text) < "58" And Asc(Text1.Text) > "47" Then
MsgBox "数字"
ElseIf Asc(Text1.Text) < "91" And Asc(Text1.Text) > "64" Then
MsgBox "大写字母"
ElseIf Asc(Text1.Text) < "123" And Asc(Text1.Text) > "96" Then
MsgBox "小写字母"
ElseIf Asc(Text1.Text) < 0 Then
MsgBox "汉字或其他字符"
Else
MsgBox "其他字符"
End If
MsgBox "数字"
ElseIf Asc(Text1.Text) < "91" And Asc(Text1.Text) > "64" Then
MsgBox "大写字母"
ElseIf Asc(Text1.Text) < "123" And Asc(Text1.Text) > "96" Then
MsgBox "小写字母"
ElseIf Asc(Text1.Text) < 0 Then
MsgBox "汉字或其他字符"
Else
MsgBox "其他字符"
End If
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询