CodeItBetter Programming Another VB Programming Blog

How to convert textbox content to uppercase

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
'Controls - How to convert textbox content to uppercase
'This code uses the KeyPress Event to convert the text entered into a TextBox control to uppercase
'as it is being entered.

'Place the following code in the textbox KeyPress Event
Private Sub Text1_KeyPress(KeyAscii As Integer)
    Char =  chr ( KeyAscii)
    KeyAscii = Asc(UCase(Char))
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.