You may want to read the code below
CODE
Private Sub Text1_KeyPress(KeyAscii As Integer)
' check for the lower case
If ((KeyAscii >= 97 And KeyAscii <= 122) And KeyAscii <> 96) Then
' OK
Exit Sub
' check for upper case
ElseIf (KeyAscii >= 65 And KeyAscii <= 90) Then
' ok
Exit Sub
End If
' all not ok
KeyAscii = 0
End Sub
' check for the lower case
If ((KeyAscii >= 97 And KeyAscii <= 122) And KeyAscii <> 96) Then
' OK
Exit Sub
' check for upper case
ElseIf (KeyAscii >= 65 And KeyAscii <= 90) Then
' ok
Exit Sub
End If
' all not ok
KeyAscii = 0
End Sub
Happy Coding
Jan 22 2006, 11:25 AM
Quote
0.0133sec
0.41
6 queries
GZIP Disabled