![]() |
Please help me find veryhidden sheets
Hi.
I found a code that works fine when hiding my sheets, but when I try to unhide them, I cant get anywhere.I get the following code: Runtime error 1004. Unable to set the property of the worksheet class Anything wrong with my code? Please help. Sub unHideModeratelyWell2() Dim shArray As Variant Dim i As Long shArray = Array("INFO SHEET", "ROSTER", "TIMESHEET", "PRODUCTION") For i = LBound(shArray) To UBound(shArray) With Sheets(shArray(i)) .Unprotect Password:="pcp123" .Visible = xlSheetVisible End With Next End Sub /////////////////////////////////////////////// The code I used to hide them was: ////////////////////////////////////////////// Sub HideModeratelyWell2() Dim shArray As Variant Dim i As Long shArray = Array("INFO SHEET", "ROSTER", "TIMESHEET", "PRODUCTION") For i = LBound(shArray) To UBound(shArray) With Sheets(shArray(i)) .Protect Password:="pcp123" .Visible = xlVeryHidden End With Next End Sub |
Please help me find veryhidden sheets
Thank you ALL for your assistance....
Dave, You hit it on the head. My workbook was protected. Once I unprotected it, it worked just fine! Thanx.... When I get my first million... You got a Krystal Burger on me! (That's with cheese!) LOL (thanx!) |
All times are GMT +1. The time now is 11:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com