Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DBavirsha
 
Posts: n/a
Default Unhide more than one worksheet at a time

I have a worksheet that contains 50 hidden worksheets. Is there a method or
macro that somebody knows of where I can unhide more than one workseet at a
time?

Thanks, Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

Dave,

Try the following code:

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"DBavirsha" wrote in
message
...
I have a worksheet that contains 50 hidden worksheets. Is there
a method or
macro that somebody knows of where I can unhide more than one
workseet at a
time?

Thanks, Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<



  #3   Report Post  
Dave O
 
Posts: n/a
Default

This will unhide every sheet in your file:

Sub UnHideHiddenSheets()
dim SheetName
For Each SheetName In Sheets
SheetName.Visible = True
Next SheetName
End Sub

  #4   Report Post  
Ken Wright
 
Posts: n/a
Default

If you have 50 hidden sheets then you are likely to want to hide them again,
so maybe a macro that toggles the status of each sheet. Run it once and it
will show all the hidden ones and hide the visible ones. Run again and it
will reverse it putting it all back as it was.

Public Sub ToggleHidden()

Dim wkSht As Worksheet

For Each wkSht In ActiveWorkbook.Worksheets
With wkSht
If .Visible = False Then
.Visible = True
Else
.Visible = False
End If
End With
Next wkSht

End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"DBavirsha" wrote in message
...
I have a worksheet that contains 50 hidden worksheets. Is there a method

or
macro that somebody knows of where I can unhide more than one workseet at

a
time?

Thanks, Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<



  #5   Report Post  
DBavirsha
 
Posts: n/a
Default

Thanks for going the extra mile. After I posted the message, I thought I
should have asked how to also write a macro to hide the sheets that I had
open. Toggling the sheets is an even better idea.

Thanks again,
Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<



"Ken Wright" wrote:

If you have 50 hidden sheets then you are likely to want to hide them again,
so maybe a macro that toggles the status of each sheet. Run it once and it
will show all the hidden ones and hide the visible ones. Run again and it
will reverse it putting it all back as it was.

Public Sub ToggleHidden()

Dim wkSht As Worksheet

For Each wkSht In ActiveWorkbook.Worksheets
With wkSht
If .Visible = False Then
.Visible = True
Else
.Visible = False
End If
End With
Next wkSht

End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"DBavirsha" wrote in message
...
I have a worksheet that contains 50 hidden worksheets. Is there a method

or
macro that somebody knows of where I can unhide more than one workseet at

a
time?

Thanks, Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<






  #6   Report Post  
DBavirsha
 
Posts: n/a
Default

Chip,

Thanks for the reply. I will try all the replies and use one of them.

Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<



"Chip Pearson" wrote:

Dave,

Try the following code:

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"DBavirsha" wrote in
message
...
I have a worksheet that contains 50 hidden worksheets. Is there
a method or
macro that somebody knows of where I can unhide more than one
workseet at a
time?

Thanks, Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<




  #7   Report Post  
DBavirsha
 
Posts: n/a
Default

Dave O,

Thank you for the response.

Dave
=@===----¬----¬----¬.¸¸.·´¯`·.¸¸.·´¯`·.¸.·<º))))<



"Dave O" wrote:

This will unhide every sheet in your file:

Sub UnHideHiddenSheets()
dim SheetName
For Each SheetName In Sheets
SheetName.Visible = True
Next SheetName
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
How do I unhide rows 1 through 28 on an Excel worksheet? Spokeshave Excel Worksheet Functions 2 January 12th 05 04:03 PM
How do I get real time stock quotes to my excel worksheet? walter Excel Discussion (Misc queries) 1 January 8th 05 12:01 AM
How do you "Unhide" multiple sheets at one time? RPF2407 Excel Worksheet Functions 4 December 27th 04 02:17 AM
Indirect reference from one worksheet to another Bill Sturdevant Excel Worksheet Functions 2 December 17th 04 01:23 PM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"