call stack question

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
 
C

Chip Pearson

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.
 
D

Dave Ring

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top