Hiding sheets

I want to have “show sheet tab” unchecked  from the option menu and only be able to unhide the sheets I need to show via macro button.  The only sheet/tab that should be visible when opening the workbook is Setup or home tab but without showing any tabs. I also need all forms of manual “unhide sheet” to be disable.

Thanks hope this makes sense.

Top Contributor Asked on June 26, 2017 in VBA: Macros.
Add Comment
1 Answer(s)

Hi Fenway,

Here is the code, It doesn’t allow users to un-hide worksheet, you can set the Visible property of worksheet to xlSheetVeryHidden and lock the VBA code. so that user can not un-hide the worksheet. The below example will hide the sheet and user can not see it in Unhide worksheet dialog list.


Sub sbVeryHiddenSheet()
Sheets("SheetName").Visible = xlSheetVeryHidden
End Sub

 Please find below link to explore more about hide or unhide sheets using VBA macros.

Hide-Unhide-Worksheets using VBA

Regards- Valli

Expert Answered on August 4, 2017.
Add Comment
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.