2个回答
展开全部
Private Sub Command1_Click()
Dim a As Integer
a = Asc(Text1.Text)
Debug.Print a
If a >毁和= 49 And a <= 57 Then
Print "数字"雹余羡
ElseIf (a >= 65 And a <= 90) Or (a >= 97 And a <= 122) Then
Print "字母"
Else
Print "符号"源拍
End If
End Sub
Dim a As Integer
a = Asc(Text1.Text)
Debug.Print a
If a >毁和= 49 And a <= 57 Then
Print "数字"雹余羡
ElseIf (a >= 65 And a <= 90) Or (a >= 97 And a <= 122) Then
Print "字母"
Else
Print "符号"源拍
End If
End Sub
展开全部
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then
MsgBox "数字!"缺碧, 65, "Msgbox例子"
ElseIf (KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z"毕滑)) Then
MsgBox "字母!", 65, "Msgbox例伏数举子"
Else
MsgBox "符号!", 65, "Msgbox例子"
End If
End Sub
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then
MsgBox "数字!"缺碧, 65, "Msgbox例子"
ElseIf (KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z"毕滑)) Then
MsgBox "字母!", 65, "Msgbox例伏数举子"
Else
MsgBox "符号!", 65, "Msgbox例子"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |