UNHIDE all worksheets

  • Thread starter Thread starter chris//DDD
  • Start date Start date
C

chris//DDD

I need to unhide all worksheets in my file with a macro...
The number of worksheets can change depending on the file.

Can anyone help me with the VBA code on this?

THANKS!!!
 
Sub ShowSheets()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Sheets
ws.Visible = xlSheetVisible
Next ws

End Sub
 
Chris,

One way:

'------
Sub unhideSheets()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.Visible = xlSheetVisible
Next
End Sub
'------

HTH
Anders Silvén
 
Back
Top