Debra had a great post about hiding worksheets with a macro the other day. I wanted to demonstrate another way using Custom Views. Start with a workbook with four sheets: Inputs, Outputs, Tables, and Settings.
When you’re actively developing the workbook, you want to see all of the sheets. But when the workbook is in use by its regular users (in production, we’ll call it) you only want to show the Inputs and Outputs sheets. With all of the worksheets visible, select Custom View from the View menu (View tab – Custom Views in 2007).
Click the Add button to create a new view and call it Development
Close out the dialog and hide the “admin” sheets. Now repeat the steps to create a Production view
To quickly change the visibility of the sheets, simply change the view from Development to Production and back
If you want to make it quicker with a macro, this will toggle between the two:
If wshTables.Visible Then
I don’t know how to explicitly check if a View is active, so I check to see if the Tables sheet is hidden. If you know a better way, please let me know in the comments.