ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unhiding all worksheets (https://www.excelbanter.com/excel-programming/365572-unhiding-all-worksheets.html)

Marco

Unhiding all worksheets
 
Someone hid about 50 sheets in a workbook. What would be the code to unhide
them all without doing it one by one from the Format menu?

Thank you

Marco

Bearacade[_26_]

Unhiding all worksheets
 

Sub Macro1()

Dim sheet As Worksheet
For Each sheet In Worksheets
sheet.Visible = True
Next
End Su

--
Bearacad

-----------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501
View this thread: http://www.excelforum.com/showthread.php?threadid=55626


Nick Hodge

Unhiding all worksheets
 
Marco

Something like

Sub unhidesheets()
Dim sht As Object
For Each sht In ActiveWorkbook.Sheets
sht.Visible = True
Next sht
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Marco" wrote in message
...
Someone hid about 50 sheets in a workbook. What would be the code to
unhide
them all without doing it one by one from the Format menu?

Thank you

Marco




Paul B

Unhiding all worksheets
 
Macro, try this,

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


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Marco" wrote in message
...
Someone hid about 50 sheets in a workbook. What would be the code to

unhide
them all without doing it one by one from the Format menu?

Thank you

Marco




Marco

Unhiding all worksheets
 
Thanks.

"Nick Hodge" wrote:

Marco

Something like

Sub unhidesheets()
Dim sht As Object
For Each sht In ActiveWorkbook.Sheets
sht.Visible = True
Next sht
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Marco" wrote in message
...
Someone hid about 50 sheets in a workbook. What would be the code to
unhide
them all without doing it one by one from the Format menu?

Thank you

Marco





Marco

Unhiding all worksheets
 
Thanks.

"Paul B" wrote:

Macro, try this,

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


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Marco" wrote in message
...
Someone hid about 50 sheets in a workbook. What would be the code to

unhide
them all without doing it one by one from the Format menu?

Thank you

Marco





Marco

Unhiding all worksheets
 
Thanks.

"Bearacade" wrote:


Sub Macro1()

Dim sheet As Worksheet
For Each sheet In Worksheets
sheet.Visible = True
Next
End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=556262




All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com