Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA ComboBox default value?

Posted on 2010-11-20
7
Medium Priority
?
1,285 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 45

Accepted Solution

by:
patrickab earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

597 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