The information in this article applies to:
SUMMARY
A Microsoft Excel for the Macintosh version 2.2, 3.0 or 4.0 macro
sheet can be changed just by running a macro. If these changes do
not need to be saved, using SAVE.AS(,0) causes Microsoft Excel to
ignore any changes that have taken place, allowing the macro to
close without an alert.
A feature in Microsoft Excel is that a "type_num" argument of 0 (zero) can be specified to save the active document in a sort of "null" file format--in effect, not saving it at all. However, Microsoft Excel will act as if the document has been saved to disk. Note that SAVE.AS(,0) will signal Microsoft Excel that the active document has been saved. Hence, it is very important that the macros that use SAVE.AS(,0) first activate the appropriate document. Issuing SAVE.AS(,0) with the wrong document active could result in important changes not being saved. When to Use SAVE.AS(,0) in MacrosIn a macro with a custom menu and a clear exit point, using SAVE.AS(,0) is relatively straightforward. The macro that is invoked when exiting the application can activate the macro sheet and issue SAVE.AS(,0).If the macro has no clear exit point, SAVE.AS(,0) can be issued from an auto_close macro. However, with auto_close, the "Save changes?" message appears before auto_close is invoked. If auto_close is inappropriate, SAVE.AS(,0) can be issued in the particular instance (or instances) where the macro is changed. For more information on the SAVE.AS function, refer to pages 369-370 in the "Microsoft Excel Function Reference," version 4.0. If you are using version 3.0, see pages 204-205 in the "Microsoft Excel Function Reference" version 3.0 manual. If you are using Microsoft Excel version 2.2, see page 272 of the "Microsoft Excel Functions and Macros" version 2.2 manual. Additional query words: 2.1 2.20 2.21 3.0
Keywords : |
Last Reviewed: March 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |