View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Macros crash, "Not enough memory"

Chuck,
You have seven no votes and two yes votes.
I would think that says re-write the code.
Are all forms being unloaded and set to nothing?
How many variants are you using?
Are you using recursion in your code?
Is there something unusual in macro 15 or 16?
There is something wrong in the code and you have to find and change it.
Regards,
Jim Cone


"CLR"
wrote in message
Thanks Jim, but that didn't work.

It appears that the problem is OS related rather than Excel related. Memory
is definately NOT the problem, even tho that is the Error Report. The
program consists of about 18 major macros that each work fine individually,
but fail about number 16 each time when they are run in succession, either by
another macro, or by hand.

Two computers using WinMe work fine, and one has only 160MBRAM. Two
computers using Win2000 failed, and five computers using WinXP failed.

It appears that there is some sort of control in those OS's which decides
that the program had done enough operations and prevents any further
operation. I don't know if it's limited to "number of lines of code" or
"number of macros" or what......but I need to solve the problem because this
program does in two minutes what the users were taking 3 hours to do by hand
each week.

Any other ideas?

Vaya con Dios,
Chuck, CABGx3



"Jim Cone" wrote:

Hi Chuck,
Emptying the Temp file is usually the first thing to try.
I am not sure what the other things might be. <g
Start | Run | %temp%
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"CLR"
wrote in message
Hi All.........
I have an Excel file with a BUNCH of macros. The file basically takes a
downloaded database as an Excel file and imports it and massages it and
Autofilters sections of it out to 15 different sheets.......the external file
is about 1.5MB and the entire combined thing is a little over 3MB, so it's
not really huge. Problem is on this 864MB/512MBRAM machine here at work, the
program crashes near the end and gives Out of Memory error. The same file
runs fine on my 1.2GB/512MBRAM machine at home, and even on my 366MB/160MBRAM
laptop.

There is 1.7GB free on the HD of the problem machine, and nothing in the
TrashBin......no other programs running......only difference that I can see
is the problem machine is on the network at work. The home machine is on a
wireless LAN, and the laptop is independent. I get the same results on the
problem machine using XL97, 2000, and 2002.

Any ideas would be appreciated..........

Vaya con Dios,
Chuck, CABGx3