"WordBasic Err=7: Out of Memory" with More Than 5 Nested SubsLast reviewed: October 10, 1997Article ID: Q101432 |
The information in this article applies to:
SUMMARYYou cannot nest subroutines or functions more than five levels deep in a Word for Windows WordBasic macro. If you call a subroutine that is nested five or more levels deep, the following WordBasic error message occurs:
WordBasic Err=7 Out Of MemoryThis happens because the WordBasic macro interpreter cannot call more than five subroutine levels. It is not a Word for Windows limitation. For example, the following macro causes the above error message when it calls a subroutine nested six levels deep:
Sub MAIN Nest1 End Sub Sub Nest1 MsgBox "Made It To Nest 1" Nest2 End Sub Sub Nest2 MsgBox "Made It To Nest 2" Nest3 End Sub Sub Nest3 MsgBox "Made It To Nest 3" Nest4 End Sub Sub Nest4 MsgBox "Made It To Nest 4" Nest5 End Sub Sub Nest5 MsgBox "Made It To Nest 5" Nest6 End Sub Sub Nest6 MsgBox "Made It To Nest 6" End Sub STATUSMicrosoft has confirmed this to be a problem in the versions of Microsoft Word for Windows listed above. This problem was corrected in Word version 6.0 for Windows. To obtain new or updated Microsoft products, call the Microsoft Sales Information Center at (800) 426-9400. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (425) 936-8661.
|
KBCategory: kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |