call stack question

  • Thread starter Thread starter Dave Ring
  • Start date Start date
D

Dave Ring

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
 
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.
 
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
 
Back
Top