Excel: GP Fault Running Tutorial with Auto_Close Macro OpenLast reviewed: September 12, 1996Article ID: Q99876 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel versions 4.0 and 4.0a, when you run the Introducing Microsoft Excel or Learning Microsoft Excel tutorials, you may receive a general protection (GP) fault if you have a document open that runs an Auto_Close macro if that Auto_Close macro contains a CLOSE() or FILE.CLOSE() statement.
STATUSMicrosoft has confirmed this to be a problem in the versions of Microsoft Excel listed above. This problem was corrected in version 5.0 of Microsoft Excel for Windows.
MORE INFORMATIONWhen you choose one of the Microsoft Excel tutorials from the Help menu, all open files and workspace settings are saved to a workbook file, CBT.XLW, which is then closed. When you exit the tutorials, Microsoft Excel opens the CBT.XLW file to restore your files and workspace settings. The GP fault appears to occur at the point that the CBT.XLW file is being created. You can designate a macro to run when a document is closed by creating the defined name Auto_Close for the document and specifying the macro that you want to run in the Refers To section of the Define Name dialog box. An Auto_Close macro is activated when you close a file by choosing Close from the File menu or by executing a CLOSE() or FILE.CLOSE() statement from another macro (not the Auto_Close macro). If you run one of the tutorials while a document containing an Auto_Close defined name is open, the Auto_Close macro will be run before the tutorial is launched. If the Auto_Close macro contains a CLOSE() statement to close the active window, or a FILE.CLOSE() statement to close the active document, you may receive a GP fault when you try to run the tutorial.
WorkaroundsIf your macro does not activate another sheet prior to executing the CLOSE() or FILE.CLOSE() statement:
Auto_Close defined name. Note: These statements are unnecessary in the Auto_Close macro because, by design, the macro must be activated by choosing Close from the File menu or by a CLOSE() or FILE.CLOSE() statement in another macro. Therefore, you can remove these statements from your macro without any loss of functionality.If your macro activates another sheet prior to executing the CLOSE() or FILE.CLOSE() statement:
REFERENCES"User's Guide 2," pages 260-261 "Function Reference," pages 55, 145
|
KBCategory: kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |