How to Hide Sheets using xlVeryHidden

Normally to view a hidden sheet a user could go to the menu and click Format > Sheet > Unhide.  Then the user could select the sheet that they wish to unhide and view.  Generally this is fine, but what if you don’t want users to access that sheet?  Using xlVeryHidden in VBA will remove that sheet from list of hidden worksheets!

  To use this you must hide the sheet programmatically using VBA.  Quick way, use my code below or type it yourself.  It must be used within the VBE (Visual Basic Environment). Remember to change the sheet name to the name of the worksheet that you want to hide.

Sub HideWorkSheet()

Sheets("Sheet1").Visible = xlVeryHidden

End Sub

To unhide the sheet you must also use VBA, but simply change the above module to this

Sub UnHideWorkSheet()

Sheets("Sheet1").Visible = True

End Sub

One thought on “How to Hide Sheets using xlVeryHidden

  1. Pingback: Excel, hidden sheets, passwords and data security?

Leave a Reply

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