Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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
Feb 4, 2003
5
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.
 
Replies continue below

Recommended for you

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