Microsoft KB Archive/104357

{| = Excel: Redraw Problem when Opening and Hiding Worksheets =
 * width="100%"|

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.
 * }