Code: Select all
Private Sub TNOMINATIVO_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If Not Chr$(KeyAscii) Like "[A-Za-z]" And KeyAscii <> 8 Then KeyAscii = 0
End Sub
if is yes, i cannot use a the space bar, why?
Code: Select all
Private Sub TNOMINATIVO_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If Not Chr$(KeyAscii) Like "[A-Za-z]" And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Code: Select all
Private Sub TNOMINATIVO_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 32, 65 To 90, 97 To 122
' Letters and space are OK
Case Else
KeyAscii = 0
End Select
End Sub