If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
unhide sheet macro
I have some files with many hidden sheets. How do I
unhide ALL of the hidden sheets using the fewest steps? I would think that I could select multiple sheets to unhide but I can't. Instead, I have to manually go to the menu and select: Format, Sheet, Unhide, select a sheet name, OK; and do this over and over again. Is there a macro that I can create so that it looks for a hidden sheet (not a specifically named sheet as the names vary from file to file), unhide it, then look for the next hidden sheet and so on until all sheets are unhidden. Hope there's an answer out there. Thanks. |
#2
|
|||
|
|||
unhide sheet macro
The following macros will hide and unhide all the sheets in the
workbook. When hiding sheets, the last sheet will remain visible. '========================= Sub UnhideSheets() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Visible = xlSheetVisible Next ws End Sub '========================== Sub HideSheets() On Error Resume Next Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Visible = xlSheetHidden Next ws End Sub '=================== Owen wrote: I have some files with many hidden sheets. How do I unhide ALL of the hidden sheets using the fewest steps? I would think that I could select multiple sheets to unhide but I can't. Instead, I have to manually go to the menu and select: Format, Sheet, Unhide, select a sheet name, OK; and do this over and over again. Is there a macro that I can create so that it looks for a hidden sheet (not a specifically named sheet as the names vary from file to file), unhide it, then look for the next hidden sheet and so on until all sheets are unhidden. Hope there's an answer out there. Thanks. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
|
|||
|
|||
unhide sheet macro
Owen
Sub Show_Sheets() Dim I As Integer For I = 1 To ActiveWorkbook.Worksheets.Count ActiveWorkbook.Worksheets(I).Visible = True Next I End Sub Gord Dibben Excel MVP On Fri, 6 Feb 2004 17:37:08 -0800, "Owen" wrote: I have some files with many hidden sheets. How do I unhide ALL of the hidden sheets using the fewest steps? I would think that I could select multiple sheets to unhide but I can't. Instead, I have to manually go to the menu and select: Format, Sheet, Unhide, select a sheet name, OK; and do this over and over again. Is there a macro that I can create so that it looks for a hidden sheet (not a specifically named sheet as the names vary from file to file), unhide it, then look for the next hidden sheet and so on until all sheets are unhidden. Hope there's an answer out there. Thanks. |
Thread Tools | |
Display Modes | |
|
|