Run time Error 1004: Copy method of Worksheet Class failed

TREY

New Member
Joined
Apr 11, 2002
Messages
3
I keep getting this error when creating a number of copies of a worksheet. I have tried: turning off the AutoCalculation, Copying a less complex worksheet, Insterting Do events - And have had now success. I was wondering would inserting a timer to slow down the copying help. Any help would be appreciated.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
On 2002-04-12 01:44, TREY wrote:
I keep getting this error when creating a number of copies of a worksheet. I have tried: turning off the AutoCalculation, Copying a less complex worksheet, Insterting Do events - And have had now success. I was wondering would inserting a timer to slow down the copying help. Any help would be appreciated.

Hi Trey

Just a couple of Q's
1) What version of Excel
2) How are you calling the routine
eg commandbutton,
3) What code are you using
 
Upvote 0
Thanks for replying:
(1) I am using Excel 97 but the same problem appears in Excel 2000
(2)I am using a command button in another sheet to start the procedure which: Deletes all worksheets in the file except for a specific 3. Then it creates the same number of copies of a timekeeping worksheets as names that have been entered in a particular range. It names each worksheet with its corresponding name in the range. The worksheet that is being copied has many drop down boxes but I still get the same problem is I copy a basic worksheet. Granted the error occurs after many more worksheets have been copied with the simpler worksheet. It looks like a memory problem as when the woorkbook is closed the macro will run once without errors when it is reopened, but even this is not hard and fast experience. When I looked up the net it pointed that the problem may be due to excel trying to do calculations but I turned on manual calculation and still encountered the problem.
(3)Here is the code where the problem is, I can send you on the rest of the code if it is any help- as it is quite short.

Do Until Timesheet_number = Counter

Sheets("Timesheet").Select
Sheets("Timesheet").copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Timesheet_number = Timesheet_number + 1
Loop


Thanks
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,072
Members
448,546
Latest member
KH Consulting

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top