Share via

how to unhide an open excel workbook

Lennart Lindström 0 Reputation points
2026-04-18T09:54:44.04+00:00

i want to know how i can unhide a hidden excel macro

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Xavier-D 7,830 Reputation points Microsoft External Staff Moderator
    2026-04-21T05:57:14.4033333+00:00

    Hello Lennart Lindström

    First, please kindly check the Q&A Assist first and feel free to give me an update after trying them. I will have some additional detail to add into this.

    If you’re trying to “unhide a macro,” it’s a bit different from unhiding a sheet.

    • Macros themselves aren’t shown like worksheets. They’re stored as VBA code inside the file.
    • If the macro is in a hidden workbook, go to View > Unhide and open it first, then access the macro.
    • To see or edit the macro, press Alt + F11 to open the VBA editor and look under Modules or the workbook project.
    • If a sheet was hidden by a macro using a special setting (like “very hidden”), it won’t appear in the normal Unhide list and must be made visible through VBA

    I hope to hear update from you soon; I'll be happy to help.


  2. Q&A Assist
    2026-04-18T09:54:58.17+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To unhide things in Excel, it is important to distinguish between:

    • A hidden workbook window
    • Hidden worksheets
    • Macros/VBA code (which can be hidden or made “very hidden”)

    Unhide a hidden workbook window

    1. Open Excel.
    2. Go to the View tab.
    3. In the Window group, select Unhide.
    4. In the Unhide dialog, select the workbook and select OK.

    If Unhide is unavailable, there are no hidden workbook windows in the current Excel session.

    On Mac:

    1. Use the Window menu on the menu bar.
    2. Select Unhide, then choose the workbook.

    Unhide hidden worksheets (normal hidden)

    1. Right-click any visible sheet tab at the bottom.
    2. Select Unhide.
    3. In the Unhide dialog, select the sheet(s) and select OK.

    Or via ribbon:

    1. Select the sheet(s) to unhide (if using the dialog, any visible sheet tab is fine).
    2. On the Home tab, select Format.
    3. Under Visibility, select Hide & Unhide > Unhide Sheet.
    4. Choose the sheet(s) and select OK.

    Unhide a sheet that was hidden with VBA as xlVeryHidden

    If a macro or VBA code has set a sheet’s Visible property to xlVeryHidden, it will not appear in the Unhide dialog. It must be made visible again via VBA:

    Example macro to unhide a specific sheet:

    Sub UnhideSheet()
        Sheets("Sheet1").Visible = True
    End Sub
    

    Example macro to hide a sheet again:

    Sub HideSheet()
        Sheets("Sheet1").Visible = False
    End Sub
    

    Example macro to make a sheet “very hidden” (only VBA can unhide it):

    Sub VeryHiddenSheet()
        Sheets("Sheet1").Visible = xlVeryHidden
    End Sub
    

    If the macro itself (VBA project) is password-protected, the password is required to view or edit the code, but the code can still be run if it is already in the workbook.

    Unhide all worksheets via automation (Power Automate Desktop example)

    If many sheets are hidden (including by macros), a script can unhide them all:

    1. In Power Automate for desktop, set a variable (for example, ExcelFile) with the full path to the workbook.
    2. Use Run VBScript with code like:
    'Opens the Excel file
    Set objExcel = CreateObject("Excel.Application")
    Set objWorkbook = objExcel.Workbooks.Open("%ExcelFile%")
    objExcel.Application.Visible = True
    
    'Unhides all the worksheets of the Excel file
    For i = 1 To objWorkbook.Sheets.Count
        objWorkbook.Sheets(i).Visible = True
    Next
    
    'Saves and closes the Excel file
    objWorkbook.Save
    objWorkbook.Close SaveChanges = True
    

    This makes every sheet visible again, regardless of how it was hidden.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.