Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
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
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
Having stack/heap memory in Excel VBA [email protected] Excel Programming 0 February 16th 05 07:45 PM
When to use a stack? Andrew[_16_] Excel Programming 15 September 7th 04 03:06 PM
Undo stack Alan Hutchins Excel Programming 1 July 8th 04 11:59 AM
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 02:29 PM.

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"