Unhide

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

Is there an easier way to unhide all the sheets in a workbook or hide a
large number of them without having to select each sheet individually.

I currently use something like this:

Sheet("sheet1").visible = true
Sheet("sheet2").visible = true
Sheet("sheet3").visible = true
Sheet("sheet4").visible = true
Sheet("sheet5").visible = true

Can I do this in a simpler statement.

Thank You,
 
try
Sub ShowAll()
For i = 2 To Sheets.Count
Sheets(i).Visible = True
Next i
End Sub
 
Hi, another way to skin the same cat:

Sub show_all()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Visible = True
Next
End Sub

Regards--Lonnie M.
 
OP:
Is there an easier way to unhide all the sheets in a workbook (my
example) or hide a
large number of them (your example) without having to select each sheet
individually.

Just trying to add to your helpful post to give him more options...

By the way thanks for all of your posts I have gleaned a great deal
from them.
Have a good one--Lonnie M.
 
Back
Top