Custom Dialog Box Leaves Copy on Screen When Moved in ExcelLast reviewed: September 12, 1995Article ID: Q72616 |
The information in this article applies to:
SUMMARYWhen a movable custom dialog box is created in Microsoft Excel, it will leave a copy of itself in the original location when moved if an =ECHO(FALSE) command is included in the macro before the dialog box is called. NOTE: This information applies when using Excel 4.0 macros when using Microsoft Excel 5.0
MORE INFORMATIONMicrosoft Excel provides the ability to create custom dialog boxes that can be moved. This is accomplished by entering a title for the dialog box in the text column of the first line in the dialog box definition. This creates a title bar and control menu (-) for the dialog box when it is displayed. The dialog box may then be moved by clicking the title bar and dragging the box or by accessing the control menu (-) and selecting Move. The latter technique allows you to move the dialog box without a mouse. When an =ECHO(FALSE) command is included in the macro prior to the =DIALOG.BOX(range) command, and the dialog box is then moved to a new position, it will still be displayed in the original location. This is because the =ECHO(FALSE) command suspends screen updating while the macro is running. The macro is not completed until after the dialog box is removed from the screen, so the original location of the dialog box is not redrawn until this time. The solution to this problem is to remove the =ECHO(FALSE) function from the macro, or to insert an =ECHO(TRUE) command into the macro prior to the =DIALOG.BOX() function. Note that movable custom dialog boxes were not possible in Excel 2.x.
REFERENCES"User's Guide 2," version 4.0, page 272 "User's Guide," version 3.0, page 632 "Function Reference," version 4.0, page 122 "Function Reference," version 3.0, page 62
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |