Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try a line to Save the workbook after deleting the sheets and before adding
new ones. Excel keeps track of all deleted sheets until saved or closed so you are probably loading up memory and the Undo buffer. Mike F "kdev" wrote in message ... I have written some code in VBA to loop X number of times and create a new worksheet during each iteration with some data in from a master worksheet. When I first start-up Excel, I can create over 40 worksheets without a problem, however if clear all the worksheets (delete them) and run the code again (to create another 40), Excel/VBA produces this error message: Run-time error '1004': Method 'Copy' of object '_Worksheet' failed Is this Excel running out of memory? If so, how can I clear it during each iteration or at the end of the cycle? Thanks! -- kdev ------------------------------------------------------------------------ kdev's Profile: http://www.excelforum.com/member.php...o&userid=16530 View this thread: http://www.excelforum.com/showthread...hreadid=319272 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method for creating formulas to reference different worksheets? | Excel Worksheet Functions | |||
Method 'Range' of Object_Worksheet Failed | Excel Programming | |||
Copypicture method failed | Excel Programming | |||
Calculation Method Failed | Excel Programming | |||
Method ~ of Object ~ Failed. | Excel Programming |