Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default 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!)

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
Validation OK to named ranges in Veryhidden sheets? tskogstrom Excel Programming 8 June 5th 07 11:41 AM
VeryHidden causing a problem...? Darin Kramer Excel Programming 0 April 11th 07 04:54 PM
VeryHidden Darin Kramer Excel Programming 2 September 13th 05 05:30 PM
Sheet hidden and VeryHidden Marc Excel Discussion (Misc queries) 6 March 29th 05 12:33 AM
Problems with vb.veryhidden Dumbass[_2_] Excel Programming 2 July 20th 04 05:08 AM


All times are GMT +1. The time now is 06:54 PM.

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

About Us

"It's about Microsoft Excel"