PDA

Click to See Complete Forum and Search --> : Converting Lowercase to uppercase on keypress EvB 3.0


ironslave
Jun 10th, 2007, 11:45 PM
i am trying to convert lowercase to uppercase, how can i do this currently i do it like this but it does not work

Private Sub find_KeyPress(ByVal KeyAscii As Integer)
If KeyAscii > 96 And KeyAscii < 123 Then
'Typed letter from "a-z", map it to "A-Z"
KeyAscii = KeyAscii - 32
End If
End Sub

but is there also a way to check each Character in a text box and make it uppercase when a button is pressed?

petevick
Jun 11th, 2007, 01:12 AM
Hi,
change the byval to byref and you should be OK

Pete