Excel.Tips.Net ExcelTips (Menu Interface)

Unhiding Multiple Worksheets

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Unhiding Multiple Worksheets.

When you choose to hide worksheets in a workbook, Excel allows you to hide multiple sheets with one action: all you need to do is select the sheets before actually doing the hiding. Unhiding worksheets is a different story, however. Excel only allows you to unhide one at a time. If you have many worksheets you want to unhide, this can be very tedious.

The only way around this is to use a macro to unhide the worksheets. The following VBA macro will unhide all the worksheets in the current workbook:

Sub UnhideAllSheets()
    Dim wsSheet As Worksheet

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

If you would rather not unhide all the worksheets at once, you can cause the macro to ask about each hidden worksheet and then unhide each that you agree to unhide. The following macro will handle this task:

Sub UnhideSomeSheets()
    Dim sSheetName As String
    Dim sMessage As String
    Dim Msgres As VbMsgBoxResult

    For Each wsSheet In ActiveWorkbook.Worksheets
        If wsSheet.Visible = xlSheetHidden Then
            sSheetName = wsSheet.Name
            sMessage = "Unhide the following sheet?" _
              & vbNewLine & sSheetName
            Msgres = MsgBox(sMessage, vbYesNo)
            If Msgres = vbYes Then wsSheet.Visible = xlSheetVisible
        End If
    Next wsSheet
End Sub

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2603) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Unhiding Multiple Worksheets.

Related Tips:

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!


Comments for this tip:

Vivek     01 Jul 2015, 02:14
Thanks, this was superb and worked in seconds
DAC    25 Jun 2015, 14:51
Very helpful
Somnath Naskar    21 Apr 2015, 11:30
You saved my day buddy! this was really helpful
Phone    20 Apr 2015, 01:01
Thank you very much for the VBA macro.
Karl B.    06 Mar 2015, 17:22
Great job! Thanks!!
mary Jo Deichmiller    11 Feb 2015, 14:20
Thank you this was very helpful!!!
Maruthi Prasad    16 Dec 2014, 09:32
Its awesome dude !!
grazie    20 Sep 2014, 20:49
awesome code!
Rajan Reddi    29 Aug 2014, 10:34
Deepthi    01 Aug 2014, 03:29
Thanks for the help man... its awesome..
nanu noran    17 Jul 2014, 09:59
you saved me lots of suffering from unhiding select tabs, Truly appreciated mate.
Hema    23 Jun 2014, 01:24
Excellent tip - Thanks
Fred Peters    09 Jun 2014, 15:07
Thanks for the tips, if I can imagine it, there's usually a way to do it, and if I'm stumped, I come here.

vins    03 Jun 2014, 08:49
Thanks it's really brilliant. ..
diskedit    19 Mar 2014, 15:05
The Worksheets.Visible property can be set to xlSheetVisible, xlSheetHidden, or xlSheetVeryHidden. The xlSheetVeryHidden setting hides the worksheet from all users and can only be unhidden using VBA. I would recommend changing a line in the UnhideSomeSheets() function to account for both possible hidden settings.

Change: If wsSheet.Visible = xlSheetHidden Then

To: If wsSheet.Visible <> xlSheetVisible Then

Most people won't run into xlSheetVeryHidden, but I have used it for certain projects. I just like to account for all possibilities.
Deniece    19 Feb 2014, 22:12
Thank you, thank you - worked GREAT!!
Bruce    13 Feb 2014, 13:23
Never written or used a macro before but this worked PERFECT!

Thank for the help.
Tannya    25 Jul 2013, 16:15
Thanks!!! Worked great
RachelB    26 Jun 2013, 11:50
Works in Office 2013 too.

Brilliant - will save me an absolute shed load of time!

Now to re-write to hide sheets too.
suresh    26 Jun 2013, 02:09
Great tip..worked well.

Suresh Yellayi
Wei    13 Jun 2013, 17:11
Thanks a lot! Very helpful
Rochelle Tiu    20 May 2013, 05:53
Very helpful. Thanks
cOL    15 Mar 2013, 09:01
Same again - many thanks for code that saves so much hassle!
Andrew Champagnie    09 Jan 2013, 15:56
This is great...outstanding macro
KCM    25 Oct 2012, 08:52
Brilliant, both scripts
NDW    24 Sep 2012, 11:05
Thank you! This is exactly what I needed.
LC    27 Aug 2012, 12:20
thank you! this works
Rich    13 Jun 2012, 17:50
smart macro, awesome dude!
Tom    09 May 2012, 12:00
Works great - thanks!
Yamini    28 Nov 2011, 23:58
Really superb...

Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 4+5 (To prevent automated submissions and spam.)
          Commenting Terms

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2013)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2013)

Our Products

Premium Newsletters

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2015 Sharon Parq Associates, Inc.