How do i make a text box convert whatever is typed into it upper case, while it is being changed?
Printable View
How do i make a text box convert whatever is typed into it upper case, while it is being changed?
try:
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii > 96 And KeyAscii < 123 Then
KeyAscii = KeyAscii - 32
End If
End Sub
thanx
Simpler:
Code:Private Sub Text1_Change()
Text1.Text = StrConv(Text1.Text, vbUpperCase)
End Sub
yea, that was the code i woz using before, but I'm running this program on a 486 with 8meg of ram, and when i type something in it would show the lower case letter for about a second sometimes before changing it!!!:rolleyes:
thanx anyway!:D
...or
Code:Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub