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
 

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