Using Drop Down Lists in Userform to Hide Sheets

ob1kin0bi

New Member
Joined
Jun 5, 2013
Messages
12
Let's say I have Sheet1-Sheet6. I also have combobox1 (with item 1, 2, & 3 as the list items) & combobox 2 (with items 1 & 2 as the list items).

If combobox1 = 1 & combobox2 = 1 then
hide Sheets 2,3,4,5,6
if combobox1 = 1 & combobox2 = 2 then
hide Sheets 1,2,4,5,6
If combobox1 = 1 & combobox2 = 3 then
hide sheets 1,2,3,4,6
If combobox1 = 2 & combobox2 = 1 then
hide sheets 1,3,4,5,6
If combobox1 = 2 & combobox2 = 2 then
hide sheets 1,2,3,5,6
If combobox1 = 2 & combobox2 = 3 then
hide sheets 1,2,3,4,5

I would like to also make both of these combo boxes required fields and to default text to say 'Select One...'

Any help is greatly appreciated, thank you!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,108
Messages
6,170,140
Members
452,304
Latest member
Thelingly95

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