Excel: Redraw Problem when Opening and Hiding Worksheets

Last reviewed: September 12, 1996
Article ID: Q104357
The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.0, 4.0, and 4.0a

SYMPTOMS

In Microsoft Excel, a macro that opens and then hides a document which has been saved and minimized as an icon may produce unpredictable results when your screen is redrawn. These unexpected results include displaying only a portion of the hidden worksheets' icon and control menu box. When this happens, you may be able to select some of the control menu commands (such as the Maximize command).

CAUSE

These unexpected results occur when the ECHO(FALSE) macro command appears in the macro prior to the OPEN() and HIDE() statements.

WORKAROUND

To keep the screen from being redrawn, do either of the following:

  • Save the document window in the maximized or restored state.

    -or-

  • Do not use the ECHO(FALSE) command before you open the sheet.

MORE INFORMATION

In Microsoft Excel, the following attributes are saved when you save a document: the window size, the number of open windows, and the state (other than the maximized state) of the window. If you save a worksheet in the minimized state (as an icon), it will appear as an icon when you reopen it.

You CAN unhide a sheet by choosing the Unhide command from the Window menu, even if the sheet is minimized and opened while ECHO=FALSE is active. When you are using ECHO(TRUE), a macro to OPEN() and HIDE() the sheet will display the icon briefly before hiding it.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.00 4.00 4.00a maximize restore



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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.