But i need also to set only a letter in textbox.
Code: Select all
Private Sub TNOMINATIVO_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Code: Select all
Private Sub TNOMINATIVO_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Code: Select all
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 65 To 90, 97 To 122
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
Case Else
KeyAscii = 0
End Select
End Sub
TKS,SpeakEasy wrote: ↑04 Apr 2022, 18:30Code: Select all
Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 65 To 90, 97 To 122 KeyAscii = Asc(UCase$(Chr$(KeyAscii))) Case Else KeyAscii = 0 End Select End Sub
Code: Select all
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 65 To 90, 97 To 122, 8, 9
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
Case Else
KeyAscii = 0
End Select
End Sub