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

Hello I Have the following code:

Worksheets("Data History").Copy after:=Worksheets("Adviser")

and if produces this error:

Run-time error '1004':

Copy method of Worksheet class failed

Both Sheets referenced in the code exist in the workbook. Any Ideas why this
is happening. It only started recently. The code worked before.

Regards and thanks for all help.

Francis.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy method of Worksheet class failed

Hello.
I solved my own problem.
entered line:
Worksheets("Data History").Activate
before the offending line and code now works.

? Why does it need this as the Worksheet is referenced explicitly.

Regards

Francis.

"Francis Brown" wrote:

Hello I Have the following code:

Worksheets("Data History").Copy after:=Worksheets("Adviser")

and if produces this error:

Run-time error '1004':

Copy method of Worksheet class failed

Both Sheets referenced in the code exist in the workbook. Any Ideas why this
is happening. It only started recently. The code worked before.

Regards and thanks for all help.

Francis.




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
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 2 April 7th 04 01:43 PM
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 0 April 5th 04 11:12 PM
Copy Method of Worksheet Class Failed Steph[_3_] Excel Programming 1 April 5th 04 09:56 PM
RE :Copy method of Worksheet class failed? Steph[_3_] Excel Programming 0 April 2nd 04 11:04 PM
Copy method of Worksheet class failed? Steph[_3_] Excel Programming 1 April 2nd 04 09:52 PM


All times are GMT +1. The time now is 02:19 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"