Excel: Exiting Windows from a Command MacroLast reviewed: September 2, 1997Article ID: Q77976 |
The information in this article applies to:
SUMMARYIMPORTANT: The CALL and REGISTER functions are provided for advanced users only. If you use these functions incorrectly you may accidentally cause errors in your system's operation. The following macro fragment will exit Windows whan it is run: A1: =REGISTER("USER","ExitWindows","AJI") A2: =CALL(A1,1,0) This will cause Windows to close all open applications immediately and return to MS-DOS.
MORE INFORMATIONWARNING: Sheets being edited in the current instance of Microsoft Excel (the instance from which the macro is run) will be closed without confirmation. You will lose any changes made since the last time your files were saved. Other Windows applications and instances of Microsoft Excel will ask for confirmation just as if you had exited Windows manually. The macro statement shown above actually makes a call to a Windows DLL (dynamic-link library) in the same way that using the Exit option on the File menu of Program Manager would. Each application must agree to be closed (for example, if you choose Cancel when an application asks you if you want to save a file, the exit request also is canceled).
REFERENCES"User's Guide 2," version 4.0, pages 231-238 "Microsoft Excel User's Guide," version 3.0, pages 595-600 "Microsoft Windows Software Development Kit Reference - Volume 1," version 3.0, page 3-6
|
Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |