Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default call stack question

Not infrequently, I run into "Out of stack space" run time errors when
running recursive routines. Is there any solution to this other than
eliminating recursion and rewriting the code with my own stack? Is
there, for instance, some way to allocate more room for the VBA call stack?

Dave Ring

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default call stack question

Dave,

As far as I know, there is no way to increase stack size. You'll have to
rewrite the code in such as way that it doesn't fill up the stack, e.g.,
eliminating so much recursion.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com

"Dave Ring" wrote in message
...
Not infrequently, I run into "Out of stack space" run time errors when
running recursive routines. Is there any solution to this other than
eliminating recursion and rewriting the code with my own stack? Is
there, for instance, some way to allocate more room for the VBA call

stack?

Dave Ring



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default call stack question

Pity. Recursion is simpler and clearer than setting up my own stack
arrays, and when I do the latter, I find a depth of 100-200 is usually
adequate. I don't run out of memory, so there seems to be no reason
that VBA couldn't be more generous with its internal stack limit.

Dave

Chip Pearson wrote:
Dave,

As far as I know, there is no way to increase stack size. You'll have to
rewrite the code in such as way that it doesn't fill up the stack, e.g.,
eliminating so much recursion.



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
Visual basic 6.5 question using combo box and call procedure. TAS Excel Discussion (Misc queries) 7 April 15th 09 06:46 PM
On call calendar question CJC Excel Discussion (Misc queries) 1 November 21st 08 09:06 PM
Very easy question! (But not sure what to call it - maybe transpos Alexander Excel Worksheet Functions 3 September 4th 08 02:37 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
stack columns Wan Excel Discussion (Misc queries) 1 December 26th 05 05:22 AM


All times are GMT +1. The time now is 04:30 AM.

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"