Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default visible method of worksheet class failed error

I am running exel 2003 and get a run-time error '1004 Visible method of
worksheet class failed. I am simply trying to go from one sheet that is
visible now <costsheet to another sheet <Main that is not visible now.
When I get to <main, I then want to hide <costsheet I have tried all the
tricks I know of to no avail and could use a little help. Here is my code:

ActiveWorkbook.Unprotect Password:="pw"
Dim Main As Worksheets

Worksheets("Main").Unprotect Password:="pw"


Worksheets("Main").Visible True <This is where it bogs down

Worksheets("Main").Range("d2").Select

Worksheets("costsheet").Visible False
Worksheets("Main").Protect Password:="pw"
ActiveWorkbook.Protect Password:="pw"


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
visible method of worksheet class failed error Tom Hutchins Excel Programming 4 February 27th 09 05:59 PM
Error 1004 Copy method of worksheet class failed Ayo Excel Discussion (Misc queries) 3 March 28th 08 02:05 PM
Error Message Copy method of worksheet class failed Philip4946 Excel Programming 7 September 14th 06 08:26 PM
Error 1004 Paste method of Worksheet class failed skvabbili Excel Programming 1 May 4th 06 11:03 PM
Paste method of worksheet class failed error Todd Huttenstine[_2_] Excel Programming 1 December 16th 03 10:08 AM


All times are GMT +1. The time now is 02:03 AM.

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"