Dropdown List In Form

HarryT

New Member
Joined
Jun 1, 2006
Messages
35
I am trying to create a dropdown list in a form. I created the form and added the ComboBox but can't figure out how to add values for the enduser to choose.

Any suggestions?

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi, what is wrong with this code? I want the box to show "Blue" in the dropdown.

Private Sub ComboBox1_Change()
ComboBox1.RowSource "Blue"
End Sub

Thanks again!
 
Upvote 0
Maybe

Code:
Private Sub ComboBox1_Change()
ComboBox1.AddItem "Blue"
End Sub

But adding Blue would be better done vin the UserForm_Initialize code I think.
 
Upvote 0
Thanks, but nothing I am trying is working. Is it possible to drive the dropdown in a form from a list in the spreadsheet itself? Such as Range ("A1:A3"). I tried this as well and it doesn't work. In range A1-A3 I have colors listed... Blue, Red, Black

Private Sub ComboBox1_Change()
ComboBox1.RowSource = Range("A1:A3")
End Sub

Doesn't seem like it should be this difficult. I am not familiar with the UserForm_Initialize code.

Thanks
 
Upvote 0
Try like this

Code:
Private Sub ComboBox1_Change()
ComboBox1.RowSource = "A1:A3"
End Sub
 
Upvote 0
Nope, I have tried RowSource, AddItem both numerous ways. Can't seem to find the right combination.
 
Upvote 0
This works for me

Code:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "A1:A3"
End Sub

When you display the userform you will need to click the dropdown arrow to see the list.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,756
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top