PDA

View Full Version : Call Stack overflow



QuiksilverHg
07-29-2007, 03:27 PM
Hi, I'm using Excel 2007, I only have fairly basic programming skills, but have gotten decent with VBA.

Right now apparently I don't know the proper way to call a procedure and the help file isn't giving me any answers. When I call a new procedure I want the other one to just disappear, but apparently it isn't it's staying open and just sitting there. I have two procedures call eachother back and forth throughout the program and am now having my stack of calls overflow. Is there a way to call a new procedure such that the original procedure ends? What is the command for that?

For example I have two procedures 'checker' and 'filler' that keep calling eachother back and forth. Right now within checker I just call filler as

filler (z) {where z is a variable I am passing}

then filler calls checker as

checker

is there a way to call the procedure such that the old one will close and not stay open and eventually overflow the stack?

Bob Phillips
07-29-2007, 03:46 PM
Clearly, you have gotten the code in a basic loop,with no termination point.

What exactly are you trying to do (in English), so that we can recommend a course of action.