Run time error 28: Out of stack space

  • Thread starter Thread starter Will Wirtz
  • Start date Start date
W

Will Wirtz

I am programming an excel spreadsheet macro that processes columns of
data and auto generates a chart per column. I have read the news
group articals specifying that recursive procedure calls or a lot of
procedure calls can cause this error. I have a single main procedure
that calls 1 procedure that does all of the looping for the coulumns
and does not call any other procedures. So this should not be a
problem.

If I tell the app to do the first 10 columns it works fine. the first
20 columns just fine. But there is a number (somewhere around 30)
that the macro just starts erroring out. I'm guessing there is some
kind of memory leak. I know it's not a limitation with the excel
document size because I can run the app in 10 column increments until
I've generated 50 columns with no problems. Does anyone have any
suggestions?

Thanks
 
I'm guessing there is some kind of memory leak.

It might be but I'd guess not. There is a limit on recursive calls and
somehow you're exceeding it, or so I'd guess. But it could be something
else. I think you should debug it carefully on a 30 column example. Of
course if the code is not long you might post it.

--
Jim Rech
Excel MVP
|I am programming an excel spreadsheet macro that processes columns of
| data and auto generates a chart per column. I have read the news
| group articals specifying that recursive procedure calls or a lot of
| procedure calls can cause this error. I have a single main procedure
| that calls 1 procedure that does all of the looping for the coulumns
| and does not call any other procedures. So this should not be a
| problem.
|
| If I tell the app to do the first 10 columns it works fine. the first
| 20 columns just fine. But there is a number (somewhere around 30)
| that the macro just starts erroring out. I'm guessing there is some
| kind of memory leak. I know it's not a limitation with the excel
| document size because I can run the app in 10 column increments until
| I've generated 50 columns with no problems. Does anyone have any
| suggestions?
|
| Thanks
 

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

Back
Top