Add items to Userform Combobox based on Listbox values

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,422
Office Version
  1. 2016
Platform
  1. Windows
I have a Listbox on a Userform which is populated like this;

Code:
ListBox1.RowSource = Range(Sheet4.Range("Z2"), Sheet4.Range("Z65536").End(xlUp)).Address(, , , True)

What I need to do is populate a range of Comboboxes with values from that Listbox - so if a value disappears from the Listbox it's not available in any of the Comboboxes which currently have no value selected. I only need this to apply to those comboboxes which currently have no value.

Not sure if it matters, but all of the comboboxes are named Combo1, 2 and 3 and so on, up to 20.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
you add items by adding values to the range.
I automatically validate the range upon form opening....
get the # rows in the range
set the combo .rowsource to this range
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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