Home > How-To Library > Controls

How to convert textbox content to uppercase

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
'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

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.