|
|
Title | Make a TextBox automatically capitalize input |
Keywords | uppercase, upper case, capitalize, TextBox, input |
Categories | Controls |
|
|
Make the TextBox's Change event handler capitalize the text. Save and restore the SelStart property so resetting the value does not move the insertion position.
|
|
Private Sub Text1_Change()
Dim old_pos As Integer
old_pos = Text1.SelStart
Text1.Text = UCase(Text1.Text)
Text1.SelStart = old_pos
End Sub
|
|
Formatted by
Neil Crosby
|
|
|
|
|
|