Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


out of stack space?

Posted on 2003-03-27
Medium Priority
Last Modified: 2010-04-07
I am getting an out of stack error, I have abour 200 countrols on this on form, and about 300 variables, some of the control are user controls that have control within them. Can the stack not handle that or is there possibly something else wrong?
Question by:sk33v3
  • 2
LVL 32

Accepted Solution

Brendt Hess earned 200 total points
ID: 8220856
Usually, an out of stack space error is uncontrolled recursion, or a Circular call.  For example, you have Usercontrol A.  During its initialization routine, it calls Subroutine B, which initializes UserControl B, which calls Subroutine A, which initializes UserControl A, which calls subroutine B, which... well, you get the idea.

A recursive or circular reference will eat up stack space pronto.  How soon are you getting the out of stack space, and under what circumstances (on load of project, on load of compiled app, or what?)

Author Comment

ID: 8220898
well its not on the loading of a form but when i try to reference a variable from within one of my usercontrols. the source code has 1 line which just retreives the value from a flexgrid.

Expert Comment

ID: 8221084
this line probably gets executed over and over again.  I have had situations like that.  What procedure is it in?

Author Comment

ID: 8221099
ok Found it bhess was right it was a recursion type issue. i raised an event eveytime I left a certain cell. well the problem is that leaving the caused another leavecell event. so I basically had a never ending loop. Thanks Bhess

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question