Hidden worksheets

  • Thread starter Thread starter wally
  • Start date Start date
W

wally

In a workbook, a number of worksheets have been hidden. Periodically it is
necessary to ‘unhide’ and display all these worksheets. Is it possible to do
this without the necessity to unhide the sheets one at a time?
 
You need VBA

Sub UHsheets()
'unhides hidden sheets
For Each ws In Worksheets
ws.Visible = True
Next ws

End Sub

To hide again:

Sub HideAllSheets()
'hides all except specified (Sheet1) in sample
'You need to keep at least one
'visible worksheet in workbook
For Each ws In Worksheets
If ws.Name <> "Sheet1" Then
ws.Visible = False
End If
Next ws
End Sub
 
Back
Top