Sunday, May 9, 2010

EXCEL - Unhide Multiple Worksheets at Once

Note, you can only do this with a VBA macro (there is no shortcut) but it's easy!

Here's how to Create a macro using Microsoft Visual Basic
  1. On the Tools menu in Microsoft Excel, point to Macro, and then click Visual Basic Editor.
  2. On the Insert menu, click Module.
  3. Type or copy the code below into the code window of the module.
  4. If you want to run the macro from the module window, press F5.
  5. When you're finished writing your macro, click Close and Return to Microsoft Excel on the File menu.
The code:

Sub UnhideAllSheets()
    Dim wsSheet As Worksheet

    For Each wsSheet In ActiveWorkbook.Worksheets
        wsSheet.Visible = xlSheetVisible
    Next wsSheet
End Sub

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...