How to Unhide All Sheets in Excel Using VBA

How to Unhide All Sheets in Excel Using VBA

When you hide multiple sheets in Excel, manually unhiding them can be a tedious task. However, with a simple VBA macro, you can automate this process and unhide all sheets instantly.

Why Use VBA to Unhide Sheets?

Excel allows you to hide and unhide sheets, but if multiple sheets are hidden, you must unhide them one by one manually. Using VBA, you can:

  • Save time by unhiding all sheets at once.
  • Automate repetitive tasks in Excel.
  • Improve efficiency when working with large workbooks.

Steps to Unhide All Sheets Using VBA

  1. Open your Excel workbook.
  2. Press Alt + F11 to open the VBA Editor.
  3. Click Insert > Module to create a new module.
  4. Copy and paste the VBA code into the module.
  5. Press F5 or run the macro to unhide all sheets.

Final Thoughts

Using a simple VBA macro, you can quickly unhide all sheets in Excel without the hassle of doing it manually. This method is perfect for those who frequently work with hidden sheets and need a quick solution.

Sub UnhideAllSheets() Dim ws As Worksheet For Each ws In Worksheets ws.Visible = xlSheetVisible Next ws End Sub