Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Memory jam after too many worksheet copy steps?

I have a model that is used to download companies' financial data from
a database. For purposes of formatting for printing, I copy the whole
of a template worksheet using the VBA code Comp0.Copy
After:=Sheets(Worksheets.Count). Comp0 is the codename for the
template sheet. Onto the newly created sheet, I then copy preformatted
data for a company. Everything works fine until I make about 30 of
these worksheet copies, and then the macro jams. If I then save the
file, and open it up again, the sequence works again--I assume because
some memory block gets cleared up when you close and restart the file.

Has anybody else had this problem, and is there a way to avoid it?
(One workaround is to insert a new worksheet, copy everything over,
redo the page setup settings for the printing. But specific print
ranges in the sheet present other problems.)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Memory jam after too many worksheet copy steps?

Give this a look...

http://support.microsoft.com/default...84&Product=xlw
--
HTH...

Jim Thomlinson


"jayray" wrote:

I have a model that is used to download companies' financial data from
a database. For purposes of formatting for printing, I copy the whole
of a template worksheet using the VBA code Comp0.Copy
After:=Sheets(Worksheets.Count). Comp0 is the codename for the
template sheet. Onto the newly created sheet, I then copy preformatted
data for a company. Everything works fine until I make about 30 of
these worksheet copies, and then the macro jams. If I then save the
file, and open it up again, the sequence works again--I assume because
some memory block gets cleared up when you close and restart the file.

Has anybody else had this problem, and is there a way to avoid it?
(One workaround is to insert a new worksheet, copy everything over,
redo the page setup settings for the printing. But specific print
ranges in the sheet present other problems.)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Memory jam after too many worksheet copy steps?


Maybe...
http://support.microsoft.com/default...b;en-us;210684
"Copying Worksheet Programmatically Causes Run-Time Error 1004 in Excel"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"jayray"
wrote in message
I have a model that is used to download companies' financial data from
a database. For purposes of formatting for printing, I copy the whole
of a template worksheet using the VBA code Comp0.Copy
After:=Sheets(Worksheets.Count). Comp0 is the codename for the
template sheet. Onto the newly created sheet, I then copy preformatted
data for a company. Everything works fine until I make about 30 of
these worksheet copies, and then the macro jams. If I then save the
file, and open it up again, the sequence works again--I assume because
some memory block gets cleared up when you close and restart the file.

Has anybody else had this problem, and is there a way to avoid it?
(One workaround is to insert a new worksheet, copy everything over,
redo the page setup settings for the printing. But specific print
ranges in the sheet present other problems.)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Memory jam after too many worksheet copy steps?

On Aug 3, 6:44 pm, "Jim Cone" wrote:
Maybe...http://support.microsoft.com/default...b;en-us;210684
"Copying Worksheet Programmatically Causes Run-Time Error 1004 in Excel"
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"jayray"
wrote in message
I have a model that is used to download companies' financial data from
a database. For purposes of formatting for printing, I copy the whole
of a template worksheet using the VBA code Comp0.Copy
After:=Sheets(Worksheets.Count). Comp0 is the codename for the
template sheet. Onto the newly created sheet, I then copy preformatted
data for a company. Everything works fine until I make about 30 of
these worksheet copies, and then the macro jams. If I then save the
file, and open it up again, the sequence works again--I assume because
some memory block gets cleared up when you close and restart the file.

Has anybody else had this problem, and is there a way to avoid it?
(One workaround is to insert a new worksheet, copy everything over,
redo the page setup settings for the printing. But specific print
ranges in the sheet present other problems.)


Thanks! Very helpful to know this is a bug.

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
Copy and Paste in steps [email protected][_2_] Excel Programming 1 November 17th 06 02:15 PM
Copy/Paste - Running out of Memory Cheval New Users to Excel 1 October 12th 06 01:40 PM
Excel 2000 Copy worksheet w/ ChartObjects memory leak [email protected] Excel Programming 0 February 3rd 06 12:57 AM
Make an unsaved file copy in memory? idealist Excel Programming 5 April 22nd 04 04:31 PM
Out of Memory on simple range copy! stochastic Excel Programming 3 September 24th 03 11:15 AM


All times are GMT +1. The time now is 03:15 AM.

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"