LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Unhide hidden/protected worksheets

Well, now I've done it! I was experimenting writing a macro to hide
some of the sheets in a workbook, and exclude others. It did just the
opposite of what I wanted - hid the ones I didn't want hidden. I
modified it to hide the others, knowing it would leave at least one
unhidden, which it did. But when I tried to modify the macro to unhide
some or all of the sheets, it hangs up.


Sub RecShtUnHide()
Dim wkSht As Worksheet
For Each wkSht In ActiveWorkbook.Worksheets
If Right(wkSht.Name, 7) = "Records" Then
ActiveWindow.SelectedSheets.Visible = True<--Error
End If
Next
End Sub

At the marked line of code, I get "Method visible of object sheets
failed" message. I can restore the sheets by writing a macro that
specifically spells out each sheet name, but since there are over 20
sheets, this would be time consuming.
I also have a backup from early today, but if I use that, I lose all
the work I've done, both on the macros and the worksheets themselves,
since early today.
Does anyone know if it's possible to restore the worksheets without
having to do them individually?
Thanks for the help.

 
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
hidden rows unhide on their own Dave Murto Excel Discussion (Misc queries) 3 August 12th 08 10:28 PM
unhide row does not unhide the hidden rows nikita Excel Worksheet Functions 4 May 24th 08 02:59 PM
Unhide hidden sheets Minos Excel Discussion (Misc queries) 1 November 25th 05 05:07 PM
Unhide Worksheets (hidden via macros) Mark Excel Discussion (Misc queries) 1 June 7th 05 05:21 PM
Why cannot I unhide the hidden rows ? Jim Edwards Excel Discussion (Misc queries) 2 December 4th 04 04:38 PM


All times are GMT +1. The time now is 10:52 AM.

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"