Excel: CLOSE.ALL in an Auto_Close Macro Generates Error

Last reviewed: November 30, 1994
Article ID: Q79139
The information in this article applies to:
  • Microsoft Excel for Windows, version 3.0
  • Microsoft Excel for OS/2, version 3.0

SUMMARY

Attempting to close Microsoft Excel from the application Control menu (-) with a worksheet open that contains an Auto_Close macro may result in a macro error. The error occurs if the Auto_Close macro executes a CLOSE.ALL command. The error also occurs if the Auto_Close macro executes a QUIT command.

MORE INFORMATION

The same error occurs if you attempt to close Microsoft Excel using the File Exit command, or if you attempt to close all worksheets by choosing Close All from the File menu.

Workaround

Close the worksheet by choosing Close from the File Menu or from the worksheet's Control menu (-). This will envoke the Auto_Close macro and the CLOSE.ALL or QUIT command will execute correctly.

REFERENCES

"Microsoft Excel Function Reference," version 3.0, page 32


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.1 2.10 2.10c 2.10d 2.2 2.20 2.21
3.0 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.