如题所述
用VB编程:
在下列过程中用Ascii 码识别
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii >= 32 Then
If KeyAscii <= vbKey9 And KeyAscii >= vbKey0 Then
Else
KeyAscii = 0
End If
End If
End Sub追问
在下列过程中用Ascii 码识别
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii >= 32 Then
If KeyAscii <= vbKey9 And KeyAscii >= vbKey0 Then
Else
KeyAscii = 0
End If
End If
End Sub追问
能不能写成算法,拍照发给我。。谢谢!
追答Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii = 65 And KeyAscii = 97 And KeyAscii <= 122 Then Call MsgBox("小写字母!", vbOKOnly + vbInformation, "提示")
End Sub
谢谢!
追答不客气
温馨提示:答案为网友推荐,仅供参考