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.
 

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

Back
Top