Skip to main content

Excel VBA set worksheet visibility


Set excel worksheet visibility by changing its property.

Simple and a one liner code to hide and unhide worksheet in Excel.

Sub Visible_Sheet()

Worksheets(1).Visible = 1  'Make the worksheet visible

End Sub

Sub Hide_RightClick_Unhide()

Worksheets(1).Visible = 0 
  'Hide Worksheet to Unhide Right click on Sheet name and unhide the worksheet

End Sub

Sub Super_Hide()

Worksheets("calcx").Visible = 2

 'Hide Worksheet but right click on Sheet name will not show whether the sheet is hidden or not

End Sub






Comments