Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Memory problems

I have a project with a lot of code that opens other workbooks and copies
large amounts of data from workbook to workbook.
Some aspect of the code must tie up a large amount of system resources and
keep it tied up after the code has finished executing because it often
returns a "not enough resources to complete the operation" error from
excel.
The user steps through a number of processes by clicking command buttons
(on a worksheet) sequentially. In brief, these a
- Enter a month period in a cell (like "2007-03"
- Run a sub that copies a file from a remote server to a local server and
give the file a name based on the text they entered in step 1.
- Run a sub that opens the downloaded file and copies a heap of data into
the main workbook (using copy, pastespecial, cutcopymode = false)
- Run a sub that copies 52 worksheets into a new workbook then copies every
cell on every sheet (cells.copy) in the new book and paste it all as values
(to remove the worksheet formulas). /This is the bit that causes the
resources issue/.

Is this just too much to ask a little dell workstation to do?
Do I need to release the memory used to copy the whole worksheets into a
new book?
Is there a better way to convert the worksheet formulas in 52 worksheets
into values?

I can post parts of the code if it will help.

TIA
--
Damien
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Memory problems

Damien, what version of Excel are you using? I have run into memory
problems opening and saving llots of files in versions 97/2000. By lots, I
mean 400-500.

One cure may be to add more ram to your PC. Minimum I recommend is 1024.
With 2x that I have found that Windows performance and speed is really good.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Damien McBain" wrote in message
. ..
I have a project with a lot of code that opens other workbooks and copies
large amounts of data from workbook to workbook.
Some aspect of the code must tie up a large amount of system resources and
keep it tied up after the code has finished executing because it often
returns a "not enough resources to complete the operation" error from
excel.
The user steps through a number of processes by clicking command buttons
(on a worksheet) sequentially. In brief, these a
- Enter a month period in a cell (like "2007-03"
- Run a sub that copies a file from a remote server to a local server and
give the file a name based on the text they entered in step 1.
- Run a sub that opens the downloaded file and copies a heap of data into
the main workbook (using copy, pastespecial, cutcopymode = false)
- Run a sub that copies 52 worksheets into a new workbook then copies
every
cell on every sheet (cells.copy) in the new book and paste it all as
values
(to remove the worksheet formulas). /This is the bit that causes the
resources issue/.

Is this just too much to ask a little dell workstation to do?
Do I need to release the memory used to copy the whole worksheets into a
new book?
Is there a better way to convert the worksheet formulas in 52 worksheets
into values?

I can post parts of the code if it will help.

TIA
--
Damien



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Memory problems

Bob Flanagan wrote:

Damien, what version of Excel are you using? I have run into memory
problems opening and saving llots of files in versions 97/2000. By lots, I
mean 400-500.


I'm using 2003 SP2.

One cure may be to add more ram to your PC. Minimum I recommend is 1024.
With 2x that I have found that Windows performance and speed is really good.


Unfortunately All the computers are "standard" on the corporate network.

I think I'll have to use another method.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Memory problems

Damien,
If you are copying/pasting within the same WB, then you can get memory
problems after x iterations. This is due to something to do with the Names
in the WB and according to MS only solution is to save, then close/reopen
the WB.
Don't have the MSKB link handy, but you can Google.

NickHK

"Damien McBain" wrote in message
. ..
I have a project with a lot of code that opens other workbooks and copies
large amounts of data from workbook to workbook.
Some aspect of the code must tie up a large amount of system resources and
keep it tied up after the code has finished executing because it often
returns a "not enough resources to complete the operation" error from
excel.
The user steps through a number of processes by clicking command buttons
(on a worksheet) sequentially. In brief, these a
- Enter a month period in a cell (like "2007-03"
- Run a sub that copies a file from a remote server to a local server and
give the file a name based on the text they entered in step 1.
- Run a sub that opens the downloaded file and copies a heap of data into
the main workbook (using copy, pastespecial, cutcopymode = false)
- Run a sub that copies 52 worksheets into a new workbook then copies

every
cell on every sheet (cells.copy) in the new book and paste it all as

values
(to remove the worksheet formulas). /This is the bit that causes the
resources issue/.

Is this just too much to ask a little dell workstation to do?
Do I need to release the memory used to copy the whole worksheets into a
new book?
Is there a better way to convert the worksheet formulas in 52 worksheets
into values?

I can post parts of the code if it will help.

TIA
--
Damien



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Memory problems

NickHK wrote:

Damien,
If you are copying/pasting within the same WB, then you can get memory
problems after x iterations. This is due to something to do with the Names
in the WB and according to MS only solution is to save, then close/reopen
the WB.
Don't have the MSKB link handy, but you can Google.


Thanks Nick, I'll check it out.

I tried smaller chunks by cycling through the worksheets and copying only
the usedrange, and wb.usedrange = wb.usedrange.value but all that caused
the same error.


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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
Memory problems in Excel Spammastergrand Excel Programming 0 July 5th 04 11:59 PM
Memory problems in Excel Spammastergrand Excel Programming 3 July 4th 04 05:00 PM
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc Angus Comber[_2_] Excel Programming 1 November 7th 03 01:18 PM


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

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"