98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Combo boxes - default option or message
Combo boxes - default option or message
Resolved · Low Priority · Version 2007
Tim has attended:
Excel VBA Intro Intermediate course
Combo boxes - default option or message
When I'm using a Combo Box on a form (i.e. a drop down menu), is there a way of setting one of the options as the default?
I want the user to suggest from three options (say, Option 1, Option 2, and Option 3), and when the form first initializes I would like the option selected to automaticelly be Option 1 (which the user can then change if they wish). Thank you!
RE: Combo boxes - default option or message
Hi Tim
Sorry for the delay.
To make a value in the ComboBox default to the first name you write the following line of code :
cboMyOptions.ListIndex =0
This places the first name on the list in the ComboBox window
Hope this helps:
Carlos
Thu 16 Apr 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Outlining - Grouping rows or columnsHighlight want you want to group and press ALT + SHIFT + left cursor arrow |