Hidden worksheets

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?
 
A

AltaEgo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top