Populate a list on a userform combobox

Zimmerman

Well-known Member
Joined
Jan 22, 2009
Messages
663
I'm sure this is something pretty simple for everyone but I'm having the hardest time getting it figured out. I have created a userform that has a
combobox. How can I assign a list that the user can pick from when they click on it. The list is on another tab named "Employee Data" and is in cells B4:B27. Also this list could grow and or shrink at any time so is there a way to have this list show in this combobox only the names that are in column B? It cold be from B4 to B50 at some point or it could be B4 to B10.

Thanks in advance
Excel 2016
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try this:
Change ComboBox1 to suit

Code:
Private Sub UserForm_Initialize()
With Sheets("Employee Data")
Me.ComboBox1.List = .Range("B4", .Cells(.Rows.Count, "B").End(xlUp)).Value
End With
End Sub
 
Upvote 0
You're welcome, glad to help, & thanks for the feedback.:)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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