Solved

VBA ComboBox default value?

Posted on 2010-11-20
7
1,263 Views
Last Modified: 2012-08-14
I have a ComboBox3 on userform1, that I would like to default to "Select from List" when the userform is shown.  I have other comboboxes that I would like shown blank.  Currently they are all blank and I am not sure how I did that.

How do I show the "Select from List" default value, and not have it as part of the list to select from.

Please advise and thanks. -R-
0
Comment
Question by:RWayneH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:Montoya
ID: 34180431
The text property in the Combobox would give you what you want. You can do it programatically, or you can just change the Text Property by clicking on your combobox and then going to Properties section and look for Text.
0
 

Author Comment

by:RWayneH
ID: 34180546
What is the programatic code version of this command so I can reset it to blank and reset focus to the combobox?  -R-
0
 
LVL 19

Expert Comment

by:Montoya
ID: 34180572
Combo1.Text="Select from List"
Combo1.SetFocus

0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 45

Accepted Solution

by:
patrickab earned 500 total points
ID: 34180588
For a blank:

Combo1.Text=""
Combo1.SetFocus
0
 

Author Comment

by:RWayneH
ID: 34181011
Thanks this is it and I got it to work.  -R-
0
 

Author Closing Comment

by:RWayneH
ID: 34181013
Thanks for the help!  EXCELent!
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34181019
RWayne - Thanks for the grade - Patrick
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question