Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box VB Question

Status
Not open for further replies.

RC2003

Mechanical
Joined
Feb 4, 2003
Messages
5
Location
US
I am in need of the code required to add a simple combo box to an existing macro. I would like to have the abilty to select an individual user name from a A pull down list.

Also is there an easy way to force upper case text in a text box?

Please be as descriptive and possibly provide the code as I am just beginning VB and have no clue.

Not sure if it's important but all of my code for the macro is associated with the userform.
 
One way to get all caps in a text box is to use text1.text=ucase(text1.text). If you put this in the textbox's change event it should keep all characters uppercase.

Probably a better idea would be to let the user type what they want then convert to upper case when you compare values. For example, if your code does something like this: if (text1.text = somestringvar); you could instead use: if (ucase(text1.text) = somestringvar). This would allow the user to type both upper or lowercase but would convert to uppercase for the comparison. This would probably be both friendlier to the user and easier to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top