PDA

View Full Version : [SOLVED:] Unhiding pages



legepe
07-26-2006, 09:48 AM
Hi guys,
Ive got a workbook with 49 pages with 48 (hidden using - format / page / hide)
Rather than unhiding one by one, is there a way to unhide them all together?
Thanks
legepe

uksrogers
07-26-2006, 09:55 AM
You're probably best doing a quick macro to do this. Something like this should do the trick.


Public Sub unhidepages()
Dim wb As Worksheet
For Each wb In ActiveWorkbook.Worksheets
wb.Visible = xlSheetVisible
Next
End Sub

compariniaa
07-26-2006, 09:55 AM
i haven't tested this, but this should do it


sub unhide()
dim WS as worksheet
for each WS in worksheets
activesheet.visible=true
next WS
end sub

legepe
07-26-2006, 10:35 AM
Thanks for that guys, it works a treat!!

compariniaa
07-26-2006, 10:45 AM
i haven't tested this, but this should do it

sub unhide()
dim WS as worksheet

for each WS in worksheets
activesheet.visible=true
next WS
end sub

i just realized that "activesheet" should have been changed to "WS"
but you've got your solution, so i guess it's no big deal anymore

Aaron Blood
07-26-2006, 11:02 AM
Um... Did you want that to work for ALL types of sheets or just worksheets?

You'd need to change the "Worksheets" ref to just "Sheets" if you wanted to include chart sheets as well.