Excel UserForm Dependent ComboBoxes

benntw

Board Regular
Joined
Feb 17, 2014
Messages
222
Office Version
  1. 365
Platform
  1. Windows
I have researched Excel userforms for hours looking for a way to make a combobox dependent on another combobox.

For ComboBox 6 my named range is ProjectNumber coming from my Lists Tab column E. Currently there are 8383 values on the sheet.
For ComboBox 7 my named range is TaskNumber coming from the same list tab column F. Same amount of entries.

ComboBox 6 Row Source is ProjectNumber
ComboBox 7 Row Source is TaskNumber

Both of these lists will continue to grow since they are linked to another program for updates. There are multiple duplicate Project numbers. But, the multiple numbers have unique task numbers.

What I need to do is once ComboBox 6 is populated on the userform I want the list of Task numbers to only show that are next to the Project numbers to populate ComboBox 7.

Is there a way to do this ? Everything I found didn't work with using row source and the ones I found put names in quotes. All involved Case select with names. If there isn't a way to do this the only option I have is to have one combobox with the project numbers & task numbers combined which will make it more cumbersome to select.

I appreciate the help with this.
 
Never mind about the error 9. I forgot to change sheet1 name. Now I am running into error 1004 after I selected my first entry with combobox 6.
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Solved the 1004 and your code works great. I really appreciate it. Thank you very much. My lists tab is a table that is linked to another data base. Your code did not like the filters in the table. I created another sheet to duplicate the table , but not formatted as a table. I put the normal filters on it and it worked excellent after that. Again thank you very much !
 
Upvote 0

Forum statistics

Threads
1,216,103
Messages
6,128,854
Members
449,472
Latest member
ebc9

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