Dependent Drop Downs in UserForms

cardinalphin

New Member
Joined
Nov 23, 2016
Messages
10
I'm trying to create a userform with dependent drop-down lists in it. I'm trying to populate these lists from various tables that I've got saved in a couple of sheets. I know how to use dependent drop-downs within the spreadsheet, but I can't find anything on how to do it within a userform.

The closest solution I've come up with is to populate all of these drop downs by hard coding the options into VBA. I've got almost 100 tables, and I will eventually have considerably more, so hard coding isn't really a good, manageable option.

I'm able to populate the parent list in the userform, using the tables, but I've come up empty in my search for a solution to linking to the child tables, within a userform. My apologies if this has been covered elsewhere, but I can't find anything that matches what I'm looking for.

I appreciate any help you can provide, and hope you have a great turkey day!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I'm not sure if this is what exactly you're asking, but I named the tables per the names from the parent tables. IE, I've got a table named machines, which contains several values, one of which is CTM. I've got another table named CTM. I can use data validation, and the indirect function to perform this in the spreadsheet, but that's not, at least from what I can tell, an option from within the userform.

Hopefully that's the information you were after. I haven't done anything else to link them together.

Thanks for your reply!
 
Upvote 0
So if the user was to select CTM from the parent combobox the child combobox would be populated with data from the table CTM?
 
Upvote 0
Correct. It seems to work pretty effortlessly using indirect and data validation...

Here's what I use in data validation to get to populate the child drop down list.
Code:
=INDIRECT($C$7)

Here's what I use to populate the parent list.
Code:
=INDIRECT("Components[Components]")
 
Upvote 0
You could use something like this.
Code:
ComboBox2.List = Range(ComboBox1.Value).Value
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

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