Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

combo boxes default

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Combo boxes - default option or message

Combo boxes - default option or message

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Removing the Ribbon from view in Excel 2010

At times when you want to view the whole spreadsheet, try double clicking on the ''Home'' tab on the ribbon which will hide the ribbon from view.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.