Macro to Make a Worksheet Very Hidden in Excel

A very hidden sheet doesn’t appear in Excel’s Unhide list, so people can’t unhide it from the sheet tabs. These macros hide and unhide sheets that way.

Works inExcel 2010 and later, Windows and Mac
UndoNot possible. Save a copy first
Save asMacro-Enabled Workbook (.xlsm)

New to macros? See how to use the macros on this site: copy the code, paste it into a module with Alt + F11, and run it with Alt + F8.

Make a sheet very hidden

Sub MakeSheetVeryHidden()
    Worksheets("Data").Visible = xlSheetVeryHidden
End Sub

Replace Data with the sheet name. The sheet disappears, and right-clicking the tabs won’t show it under Unhide.

Unhide a very hidden sheet

Sub UnhideVeryHiddenSheet()
    Worksheets("Data").Visible = xlSheetVisible
End Sub

Unhide every very hidden sheet

Sub UnhideAllVeryHidden()
    Dim ws As Worksheet
    For Each ws In Worksheets
        If ws.Visible = xlSheetVeryHidden Then ws.Visible = xlSheetVisible
    Next ws
End Sub

Do it without a macro

  1. Press Alt + F11 to open the VBA editor.
  2. In the Project pane, click the sheet.
  3. In the Properties window (F4), set Visible to 2 – xlSheetVeryHidden.

Things to know

  • Very hidden is stronger than hidden, but it’s not security. Anyone who opens the VBA editor can unhide the sheet.
  • To stop that, lock the VBA project: in the editor, Tools → VBAProject Properties → Protection, tick Lock project for viewing and set a password.
  • The three settings are xlSheetVisible (-1), xlSheetHidden (0) and xlSheetVeryHidden (2).

Related macros