Excel: Documentation Error on CLOSE Function

Last reviewed: November 29, 1994
Article ID: Q90037
The information in this article applies to:
  • Microsoft Excel for Windows, version 4.0
  • Microsoft Excel for the Macintosh, version 4.0

SUMMARY

In the "Microsoft Excel Function Reference," version 4.0, the CLOSE functions documentation is incorrect. On page 56 of the Function Reference, the first and third remarks are incorrect.

MORE INFORMATION

The CLOSE command only closes one window of a document. If other windows of that document are open, the file itself is not closed.

The first remark on page 56 of the Microsoft Excel 4.0 Function Reference reads:

   If you close a workbook that contains an unbound sheet, Microsoft
   Excel saves the changes if SAVE_LOGICAL is TRUE, but does not close
   the window.

This is incorrect. If CLOSE is executed while the workbook contents page is active, there are two possibilities:
  • If none of the documents contained in the workbook are open in separate Windows, the workbook closes. If SAVE_LOGICAL is TRUE, the workbook is saved before it is closed.

    -or-

  • If one or more documents contained in the workbook are open in separate Windows, only the window containing the workbook contents closes. No changes are saved on disk, regardless of the value of SAVE_LOGICAL.

In both cases, only the workbook contents window is closed. Any other windows that are open when CLOSE is executed remain open.

The third remark on page 56 of the "Microsoft Excel Function Reference" reads:

   If you make any changes to the contents of a workbook...then that
   information will be saved regardless of the SAVE_LOGICAL value.

This is only partially true. If none of the documents contained in the workbook are open in separate windows, the changes saved only if the SAVE_LOGICAL parameter is TRUE. However, if only a workbook window is closed, the information is saved in memory as long as the workbook remains open, but the file is not saved to disk.

To avoid confusion, it may be easier to use the SAVE.WORKBOOK command and/or the FILE.CLOSE command. Use FILE.CLOSE instead of CLOSE when you want to close an entire document instead of just one window in a document.

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 55-56, 145, 371


KBCategory: kbdocerr
KBSubcategory:

Additional reference words: 4.0 4.00 macro


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 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.