Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stack memory
Hi,
Is there a code that clears out the systems Stack memory that i could put in at the end of a macro? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stack memory
Haven't had one of those messages in a long time. To cure the overflow
problem, you have to dump the memory. Closing the ActiveWorkbook is one way. It is best to prevent the memory stack overflow by being careful with your code structure. Don't keep creating variables that have to store values in memory until the procedure is completed. Breaking your code into sub procedures helps. That is, if you have a lengthy program, have a master procedure that calls the sub procedures when they are needed. That way, the variables in the sub procedures are emptiedd when each sub ends. Believe me, there is a lot more to it than what I have touched on, but this little bit can help. You can Google "Stack Overflow" and get a lot more info. "Oggy" wrote: Hi, Is there a code that clears out the systems Stack memory that i could put in at the end of a macro? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Stack memory
IMHO, if you think you need to be doing that, you should examine you code
again and fix the cause of the problem. Whilst I'm all for extending the capabilities of VBA/Excel, this is one area that is best left alone. NickHK "Oggy" wrote in message ps.com... Hi, Is there a code that clears out the systems Stack memory that i could put in at the end of a macro? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XL 2007 - Out of Memory - memory leak/bug? | Excel Discussion (Misc queries) | |||
Having stack/heap memory in Excel VBA | Excel Programming | |||
When to use a stack? | Excel Programming | |||
Undo stack | Excel Programming | |||
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc | Excel Programming |