Disabling Sheet Unhide in Excel

How to hide a sheet and make it hard to unhide

You can right click a sheet tab and select Hide, but it is just as easy to Unhide the sheet. What if you want to make it harder to unhide the sheet?

Let’s say you want to reduce the number of visible sheets in the file – reduce the clutter.

You also want to make it more difficult for the user to unhide sheets.

Follow these steps.

  1. Right click a sheet tab and choose View Code – this opens the VBA window. Don’t worry, you don’t need to write a macro (but you can if you want to – see bottom of post).hide_01
  2. On the top left should be a list of sheets – see image below (press Ctrl + r if there isn’t). You might need to click the small plus sign on the left of Microsoft Excel Objects to see them.hide_02
  3. In the top section select the sheet you want to hide and then press F4 – in the Properties Window that opens use the Visible drop down option to select  2 – xlSheetVeryHidden (yes very hidden!).
  4. Done – repeat for other sheets.

The above screen is also how you make the sheet visible again.

When you now right click a sheet tab, the Unhide option is greyed out and only two sheets are visible.

hide_03

By the way you have to leave at least one sheet visible in the file.

Macro

If you did want a macro to hide as above, the following one line macro will hide the active sheet. Remember you need at least one sheet visible.

Sub Hide_Current_Sheet()
    ActiveSheet.Visible = xlVeryHidden
End Sub

See this blog post on a macro that unhides all sheets in one step.

 

 

Please note: I reserve the right to delete comments that are offensive or off-topic.

Leave a Reply

Your email address will not be published. Required fields are marked *