Solved

VBA ComboBox default value?

Posted on 2010-11-20
7
1,207 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:Iammontoya
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:Iammontoya
ID: 34180572
Combo1.Text="Select from List"
Combo1.SetFocus

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now