Solved

VBA ComboBox default value?

Posted on 2010-11-20
7
1,249 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
Industry Leaders: 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!

 
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

749 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