![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com