Excel: Saving Hidden Worksheets or Macro Sheets

Last reviewed: November 29, 1994
Article ID: Q45843

SUMMARY

In Microsoft Excel version 2.2, 3.0 and 4.0, you can hide documents so that values can be accessed and macros can be run, but the documents themselves are not displayed.

A hidden document can be made active only through a macro and is active only while the macro is running. Since the File Save command saves the active document, a hidden document cannot be saved in the standard manner.

To save changes to a hidden file, quit Excel or hold down the SHIFT key and choose Close All from the File menu. Either of these actions closes all open documents, including hidden documents, prompting you to save changes to each one. At least one unhidden document must be open for the Close All option to be available.

Note that simply hiding a document, or changing its size or shape, does not flag the document as changed. If you close a document that has no changes other than window characteristics, Excel doesn't prompt you to save changes, and the file doesn't retain those characteristics when it is reopened. To save changes to the window characteristics of a hidden document, make some other change in the document to flag it as changed.

You can also use a macro to make changes to a hidden worksheet.

MORE INFORMATION

To save a worksheet as hidden, do the following:

  1. Make some change to the document (if no changes have been made, click the formula bar and press the ENTER key on the numeric keypad).

  2. From the Window menu, choose Hide. If the window characteristics of the document are password protected, you are prompted to enter a password.

  3. Hold down the SHIFT key and choose Close All from the File menu. When asked to save changes to the hidden document, select Yes. The worksheet is saved as hidden.

Alternatively, you can use the following macro to save a hidden worksheet (in this case, the worksheet is named "hidden"):

   =ACTIVATE("hidden")
   =SAVE()
   =RETURN()

REFERENCES

"Microsoft Excel User's Guide 1," version 4.0, page 294

"Microsoft Excel User's Guide 2," version 4.0 ,page 189


KBCategory: kbusage
KBSubcategory:

Additional words: add-in 2.2 2.20 3.0 3.00 4.0 4.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 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.