Hide Tabs Based on the Choice of Multiple Items from Drop Down List

knopp

New Member
Joined
Oct 21, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a question regarding how to hide multiple sheets based on a user's selection from a drop down list. My spreadsheet has around 60 tabs (the sample only shows 30) and only 15-30 of these will be in use for a project. I would like the user to be able to use the drop down list to select which tabs they would like for the project and hide the rest.


I have attached an image of my attempt at solving this problem in VBA, however the code does not allow for multiple selections and is not hiding the correct sheets. I also attached images of the drop-down list and range it is pulling from.


Does anyone know the solution to this issue? I have tried a lot of things but have not been successful. Any help would be much appreciated!
1634837423238.png
1634837547629.png

1634837615793.png
 

Attachments

  • 1634837569928.png
    1634837569928.png
    47.1 KB · Views: 9

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,958
Office Version
  1. 365
Platform
  1. Windows
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Hide Tabs Based on the choice of Multiple Items from Drop Down List
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 

knopp

New Member
Joined
Oct 21, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Hide Tabs Based on the choice of Multiple Items from Drop Down List
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Should I delete this post?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,958
Office Version
  1. 365
Platform
  1. Windows
No need to delete the post, just in future supply the links if you cross post again.
 

knopp

New Member
Joined
Oct 21, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

No need to delete the post, just in future supply the links if you cross post again.
Sounds good. Are you able to help me with this problem?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,958
Office Version
  1. 365
Platform
  1. Windows
Not really, I seldom use controls on a sheet, I prefer to use userforms instead.
 

knopp

New Member
Joined
Oct 21, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Not really, I seldom use controls on a sheet, I prefer to use userforms instead.
Is this something that could be done with a userform?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,958
Office Version
  1. 365
Platform
  1. Windows
Yes it could be, using a multiselect listbox, rather than a combobox.
 

knopp

New Member
Joined
Oct 21, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Yes it could be, using a multiselect listbox, rather than a combobox.
Thank you so much!! The listbox worked great!! I combined it with my formula above and it worked perfectly!! Thank you again!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
67,958
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for the feedback.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,863
Messages
5,766,814
Members
425,379
Latest member
thedoctor00

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
Top