"Not Enough Stack Space to Run Macro" (111867)
The information in this article applies to:
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0c
- Microsoft Excel for the Macintosh 5.0a
This article was previously published under Q111867 SYMPTOMS
In Microsoft Excel, when you choose a control in a dialog box that is
assigned to an event macro when there are a total of three dialog boxes on
the screen that have not been dismissed, you may receive the following
error message(s):
Not Enough Stack Space to Run Macro
Error 28: Out of Stack Space
Run-time error '28':
Out of stack space
WORKAROUND
To avoid receiving either of these error messages when you call nested
dialog boxes, do not assign a dialog control (such as a button or a check
box) to a macro event that calls another dialog box. Instead, assign the
control to first dismiss the active dialog box, then call the desired
dialog box from the same the macro that called the first dialog box. To
dismiss the active dialog box, do any of the following:
- Format the control with the Dismiss property:
- Select the control and choose Object from Format menu.
- In the Format Object dialog box, select the Dismiss check box on the
Control tab.
-or-
- Assign the control to a macro that contains the following command:
ActiveDialog.Hide
-or-
- Format the control with the Cancel property:
- Select the control and choose Object from Format menu.
- In the Format Object dialog box, Select the Cancel check box on the
Control tab.
- For an additional workaround, please see the following article(s) in the
Microsoft Knowledge Base:
125805 XL: Displaying Several Dialog Boxes Without Looping
REFERENCES
"Visual Basic User's Guide," version 5.0, page 219-239
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbcode kbprb kbProgramming KB111867 |
---|
|