Microsoft KB Archive/101761

= Microsoft Knowledge Base =

Excel: FILE.CLOSE(FALSE) Command Doesn't Work in Workbook
Last reviewed: September 12, 1996

Article ID: Q101761

The information in this article applies to:


 * Microsoft Excel for Windows, versions 4.0, 4.0a
 * Microsoft Excel for the Macintosh, version 4.0

Page 145 of the "Function Reference," version 4.0, states that if you use the FALSE argument with the FILE.CLOSE function, the function will close a workbook without saving changes. This information is not entirely correct. If you use the FILE.CLOSE command in an auto-close macro in a workbook, you are prompted to save changes when you choose Close Workbook from the File menu.

When you use the =FILE.CLOSE(FALSE) macro command in an auto-close macro and you close the workbook by choosing Close Workbook from the File menu, the auto-close macro will run but you are prompted to save changes to the workbook file. This occurs even if you precede the command with the ERROR(FALSE) command.

WORKAROUND
If you run the auto-close macro by choosing Run from the Macro menu, the macro will close the workbook file as expected, without confirmation to save changes, even if changes to the documents have been made.

Therefore, to keep from getting the "Save Changes In ?" dialog box, do not run the macro as an auto-close macro. Instead, run the macro by choosing Run from the Macro menu, by assigning it to a button tool, or by running it from a custom menu.