Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default Copying a sheet fails

I have a line that copies a sheet from one book to another. It works a
number of times in my macro then inexplicably stops working.

The line is:
ActiveSheet.Copy Befo=Workbooks(NewBookName).Sheets("XXX")

And I get the error: 1004
"Copy method of worksheet class failed"

It stops when I try to add the 54th sheet in a workbook - I don't know if
that number is significant.

There is no problem with the string: 'NewBookName' or the sheet named 'XXX'
(as I say the line works 52 times)

But suddenly I get an error

Anyone seen this before?

Thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Copying a sheet fails

There have been several similar postings about this condition. In most
cases, I believe the resolution was to make a loop where after so many
copies it would break and then resume. But I don't relly remember all the
details.


"Michelle" wrote in message
...
I have a line that copies a sheet from one book to another. It works a
number of times in my macro then inexplicably stops working.

The line is:
ActiveSheet.Copy Befo=Workbooks(NewBookName).Sheets("XXX")

And I get the error: 1004
"Copy method of worksheet class failed"

It stops when I try to add the 54th sheet in a workbook - I don't know if
that number is significant.

There is no problem with the string: 'NewBookName' or the sheet named
'XXX' (as I say the line works 52 times)

But suddenly I get an error

Anyone seen this before?

Thanks

M



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copying a sheet fails

See
http://support.microsoft.com/kb/210684/en-us

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm



"JLGWhiz" wrote in message ...
There have been several similar postings about this condition. In most
cases, I believe the resolution was to make a loop where after so many
copies it would break and then resume. But I don't relly remember all the
details.


"Michelle" wrote in message
...
I have a line that copies a sheet from one book to another. It works a
number of times in my macro then inexplicably stops working.

The line is:
ActiveSheet.Copy Befo=Workbooks(NewBookName).Sheets("XXX")

And I get the error: 1004
"Copy method of worksheet class failed"

It stops when I try to add the 54th sheet in a workbook - I don't know if
that number is significant.

There is no problem with the string: 'NewBookName' or the sheet named
'XXX' (as I say the line works 52 times)

But suddenly I get an error

Anyone seen this before?

Thanks

M



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
Select a Sheet Issue in VBA on a very hidden sheet - fails christopher ward Excel Programming 6 July 21st 09 01:30 PM
Validation fails on copying x6v87qe Excel Discussion (Misc queries) 3 May 8th 07 09:10 AM
Copying Conditional Formatting Fails Henry Stockbridge Excel Programming 5 December 14th 06 09:01 PM
Activate fails when someone else is in the sheet InsideTGT Excel Programming 0 August 30th 05 03:07 PM
Copy to another sheet fails Ole[_4_] Excel Programming 1 March 24th 05 09:14 PM


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