Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unhide more than one worksheet at a time

Status
Not open for further replies.

walla07

Technical User
Mar 18, 2004
17
0
0
GB
Is it possible to unhide more than one worksheet at a time? I've tried the obvious stuff like using Shift or Ctrl, but this doesn't work.

Thanks


 
This will toggle all but the first sheet between Very Hidden and Visible. If you want them to be really invisible then change False to xlVeryHidden:-

Sub HideandShowSheets()
For i = 2 To Worksheets.Count
If Sheets(i).Visible = True Then
Sheets(i).Visible = False
End If
Next i
End Sub

or......

Sub HideandShowSheets()
For i = 2 To Worksheets.Count
If Sheets(i).Visible = True Then
Sheets(i).Visible = xlVeryHidden
End If
Next i
End Sub

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top