text boxes in forms

hainejo

Board Regular
Joined
Jun 27, 2002
Messages
57
Is there a way to format text boxes in a form so that text that is entered is always in upper case?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
What type of form? A VBA userform? Or have you got the textbox on a spreaadsheet created from the "Drawing" menu or the "Controls" menu or something?

The answer is probably "yes and no". dependant on what type of textbox we're talking about here. :)
 
Upvote 0
Excellent, here's a pretty simple way to accomplish this, suppose my textbox is called "TextBox1", I would put this code on the userform in the Textbox1 "Change" event:

<pre>
Private Sub TextBox1_Change()
Me.TextBox1.Text = UCase(Me.TextBox1.Text)
End Sub</pre>

HTH
 
Upvote 0
Try something like: -

Code:
Private Sub TextBox1_Change()

With TextBox1
    .Text = UCase(.Text)
End With

End Sub

Edit: oops, sorry, you in 'stealth' mode?
This message was edited by Mudface on 2002-08-20 12:52
 
Upvote 0
Edit: oops, sorry, you in 'stealth' mode?
This message was edited by Mudface on 2002-08-20 12:52

Sometimes. I'm just posting these days when the urge strikes me.

On a side note, I talked to a friend yesterday that had spent over a year in Hull doing some contract work for BP, she claimed that it was not, in fact, sunny. She also disagreed with the fact that anything useful came from or resided in Hull. (I proffered "The Housemartins".) :biggrin:
 
Upvote 0
On 2002-08-20 12:57, Mark O'Brien wrote:

Sometimes. I'm just posting these days when the urge strikes me.

On a side note, I talked to a friend yesterday that had spent over a year in Hull doing some contract work for BP, she claimed that it was not, in fact, sunny. She also disagreed with the fact that anything useful came from or resided in Hull. (I proffered "The Housemartins".) :biggrin:

I think I'd be banned from the board for an accurate description of Hull in my profile...
 
Upvote 0

Forum statistics

Threads
1,207,423
Messages
6,078,443
Members
446,338
Latest member
AliB

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top