Setting Filter Choices Via VBA Userfrom

Guard913

Board Regular
Joined
Apr 10, 2016
Messages
144
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
Ok, so to start, I already have code that will take the text entered into a ComboBox and apply it to filter in eXcel, once I exit that particular ComboBox, so this extra code I am needing will end up in the [Private Sub (ComboBoxName)_Exit(ByVal Cancel As MSForms.ReturnBoolean)]

However.... about 12 Filter headings, and each Filter has about 100-200 options a piece, which depending on how each filter is changed only certain options will show from each heading meaning that by selecting the first filter it can reduce Options from 100-200 to 50-100 whittling it down as filters are selected. And Side note about 281K Rows.

Example: (These are not actual options in eXcel this is just to represent)

ItemPromoType
J0161YRSOCTY
AAOYMOPERSONAL
THERMAINSTI

If I were to select Item J016, then Promo List have only MO & MA as Options, and Type would only have SOCTY Option, but
if I were to select AAOY then Promo List would only have 1YR as an Option, and Type would have PERSONAL and INSTI. Bear in mind my actual lists have 100's of options under each heading and is updated regularly.

I need a way so when I change ComboBox for (Item) [At this point it sets filter on eXcel Sheet] then Combobox for (Promo) would only show avail options for that Item, and (Type) would only show options for that Type, and so on and so forth.

I don't need exact code just enough of a sample that I can work around for my needs. (leave plenty of comments about what each section of code does so I can remove/add/change more easily) If this is even possible.

Thanks!!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,534
Messages
6,120,080
Members
448,943
Latest member
sharmarick

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