Expanding & Collapsing Sheet Tabs

Copper Contributor

I have a file with a large number of sheets.  I would like to create a way to expand and collapse the tabs for ease of use.

 

I've found an example code and file here that is what I would like to do: https://www.experts-exchange.com/articles/1685/Excel-Using-a-Sheet-Tab-as-a-Button-for-Expanding-Col...

 

However, I believe the code is written to hide all tabs EXCEPT (sheet names).  I need the code to say hide tabs (sheet names).  As an example, in the sample file I would like the "Show My Guts" button to only expand/collapse "Calcs1" and "Calcs 2", and leave the rest of the tabs remaining.  Because I have so many tabs in my actual file and will be adding more in the future, I do not want to have to add every sheet name to the code so that it won't get collapsed.

 

Thank you very much for any help you can offer!

2 Replies
Could I be so bold as to ask for an explanation of why there are so many individual sheets?

I know full well there are times when this kind of design is fully warranted; I also know that many times people create multiple sheets when there's no need, when, in fact, they're overlooking the amazing abilities of Excel to extract and summarize data from a single database on a single sheet, producing as needed summaries of histories or snapshots of data FROM that single sheet that otherwise would be on one of those many many sheets.

It is a pro forma excel file, so there are many different worksheets set up to create a financial model.  Then I have inputted monthly accounting summaries as separate tabs, each which is referenced throughout the various sheets per month in various formulas.  I would like to have all of these monthly accounting sheets collapsible, since there are so many and more for holding data.  I do not want to reference other excel files because links often are broken and I'm working off the network at home due to COVID.