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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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