Microsoft KB Archive/118373

= Microsoft Knowledge Base =

XL5: Button Not Visible in User-Defined Dialog Box
Last reviewed: March 27, 1997

Article ID: Q118373

5.00 5.00c 7.00 7.00a | 5.00 5.00a WINDOWS | MACINTOSH kbref kbusage

The information in this article applies to:


 * Microsoft Excel for Windows 95, versions 7.0, 7.0a
 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SYMPTOMS
In Microsoft Excel, when you run a Microsoft Excel 4.0 macro that displays a user-defined dialog box, if a label is defined on the dialog definition table with the same coordinates as a dialog control (such as to overlap a button), the label completely hides the control. The control still functions, but it is not visible in the dialog box.

Note that if you run the same macro in Microsoft Excel version 4.0, the control is visible, with the label on top of it.

CAUSE
This behavior occurs because of a change in the way that overlapping objects are displayed. In Microsoft Excel version 5.0, a label is filled, and covers any object that it is positioned on top of. Note that this is also true of a dialog box that you create using a dialog sheet.

WORKAROUND
To avoid covering a button or other control on a user-defined dialog box, do not overlap objects by making a label's coordinates large enough to overlap other controls in the dialog box, or by giving them the same coordinates in the dialog definition table.