ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy method of worksheet class failed (https://www.excelbanter.com/excel-programming/366648-copy-method-worksheet-class-failed.html)

Dennis Mak

copy method of worksheet class failed
 
I have used a for loop to generate new worksheets by the following statments:

For i = 1 To InputCaseNum
Worksheets(EnvTemplate(i)).Copy after:=Worksheets
Next i

I have got the following error message if the number of new worksheets
generated exceeds 30:

Run-tim error '1004':
Copy method of Workshet class failed

How can I resolve this problem?

Ron de Bruin

copy method of worksheet class failed
 
Hi Dennis

See

Copying Worksheet Programmatically Causes Run-Time Error 1004
http://support.microsoft.com/default...84&Product=xlw

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Dennis Mak" <Dennis wrote in message ...
I have used a for loop to generate new worksheets by the following statments:

For i = 1 To InputCaseNum
Worksheets(EnvTemplate(i)).Copy after:=Worksheets
Next i

I have got the following error message if the number of new worksheets
generated exceeds 30:

Run-tim error '1004':
Copy method of Workshet class failed

How can I resolve this problem?





All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com