Cap Ologist
01-04-2005, 12:11 PM
I just got an error message that really confuses me.
Run Time Error '28':
Out of stack space
Here's what happened:
I was doing some design testing on a program I'm working on. I have a form that I use as sort of a launch pad, meaning that the user can access different areas of the program from a menu bar on the left hand side. Right now, I have two Sub Procedures that actually do stuff. I only get this error message when I select one option, but not the other one. Also, when I receive the error message, the program is breaking at the first subroutine that the procedure calls.
Here's a rough outline of the program to illustrate.
Private Sub loadOpportunity
lblHeader.Caption = "Opportunity" 'Shows up as a title on a display frame.
'Declare local variables.
Dim nCounter As Integer 'Used for a loop further down in the program.
(This is where the error message appears).
Call handleDisplay(True) 'Sub routine used to set a flex grid to visible.
....More stuff
End Sub
Public sub handleDisplay(blnIndex As Boolean)
frmGameMain.grdDisplay.Visible = blnIndex
End Sub
The explanation I found said something like this was resulting from a lack of memory space.
I'm not sure why this is happening.
Is there a limit to how many procedures/functions you can have on one module? I removed some of the procedures and placed them in another module and made them public so that I could still access them from this one.
Anybody ever seen this before or have any ideas about what I'm doing wrong?
Run Time Error '28':
Out of stack space
Here's what happened:
I was doing some design testing on a program I'm working on. I have a form that I use as sort of a launch pad, meaning that the user can access different areas of the program from a menu bar on the left hand side. Right now, I have two Sub Procedures that actually do stuff. I only get this error message when I select one option, but not the other one. Also, when I receive the error message, the program is breaking at the first subroutine that the procedure calls.
Here's a rough outline of the program to illustrate.
Private Sub loadOpportunity
lblHeader.Caption = "Opportunity" 'Shows up as a title on a display frame.
'Declare local variables.
Dim nCounter As Integer 'Used for a loop further down in the program.
(This is where the error message appears).
Call handleDisplay(True) 'Sub routine used to set a flex grid to visible.
....More stuff
End Sub
Public sub handleDisplay(blnIndex As Boolean)
frmGameMain.grdDisplay.Visible = blnIndex
End Sub
The explanation I found said something like this was resulting from a lack of memory space.
I'm not sure why this is happening.
Is there a limit to how many procedures/functions you can have on one module? I removed some of the procedures and placed them in another module and made them public so that I could still access them from this one.
Anybody ever seen this before or have any ideas about what I'm doing wrong?