LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Method failed when creating new worksheets


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
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
Method for creating formulas to reference different worksheets? copticdred Excel Worksheet Functions 3 April 17th 09 12:39 AM
Method 'Range' of Object_Worksheet Failed Excel-erate2004[_21_] Excel Programming 23 September 2nd 04 05:49 AM
Copypicture method failed Kamal[_5_] Excel Programming 2 April 22nd 04 11:31 AM
Calculation Method Failed Martiin Excel Programming 2 December 1st 03 01:37 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"