User Form/Combo Box

G

Glenn

Hi,

I am making a user form in visual basic on excel, I have
put a combo box on the form but am unsure how to programe
it so that when the arrow is selected it will reveal all
the options available for the user to choose.
 
J

Jason Morin

If you're in the Visual Basic Editor, right-click on the
combobox and select Properties. Find the "Row Source" and
enter the range that contains your list (e.g., Sheet1!
A1:A5).

HTH
Jason
Atlanta, GA
 
H

Harald Staff

Or the code way (do not use this if you link it to a range with Row source):

Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "Too cheap"
.AddItem "Good deal"
.AddItem "OK"
.AddItem "Expensive enough"
.AddItem "Keep on dreaming"
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top