UpCase in userform

  • Thread starter Thread starter Karen Agostinho
  • Start date Start date
K

Karen Agostinho

Good Morning NG,
I have a text box that I receive user input for states.
I have the MaxLenght set to 2 so only things Like CA, NV, AZ can entered,
but sometimes the user wants to put in ca, nv, or az.
How can I set the text box to automatically capitalize the letters for the
users in VBA code
Thanks

Karen
 
Michael,
You know, I tried that and it didn't work, so when I saw your post I thought
OK I'll try it again and see if I made a mistake and it didn't work, I got
an error message saying that I need to define user variables. BUT, I thought
this can't be so I tried it once more, making it a third time, and now it
works !!!
Anyway thanks
Today's not going to be a bummer after all.
Kames
 
Hi,



Use the following code:



Private Sub TextBox1_Change()

TextBox1.Text = UCase(TextBox1.Text)

End Sub
 
Back
Top