Unhide Multiple Worksheets At Once

V

Val Steed

How do you unhide mutilple worksheets with one command instead of worksheet
by worksheet?

Val Steed
(e-mail address removed)
 
Y

YESHWANT

Hi Val Steed,

in Excel, you can hid all but one sheets in a workbook in a single stroke
thru :
on the sheet tab, right click and "select all sheets" and the deselect the
sheets which are not to be hidden with regular click of the mouse on
the/those sheets, and then click on format-sheet-hide and your desired
results are achieved.

click yes below, if it helps
 
V

Val Steed

Sorry but no. I am looking for a way to unhide a group of worksheets all at
once. What you describes works for hiding but not for unhiding.

I think there is some VBA code that will work but I am not a VBA head.

Val
 
G

Gord Dibben

All hidden sheets?

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

An array of sheets?

Sub unhide_sheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets(Array _
("Sheet1", "Sheet2", "Sheet3"))
ws.Visible = True
Next ws
End Sub


Gord Dibben MS Excel MVP
 

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