Microsoft KB Archive/104936

= Microsoft Knowledge Base =

XL: Double-Clicking Control Activates Default Button
Last reviewed: September 13, 1996

Article ID: Q104936

The information in this article applies to:


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

SUMMARY
In custom dialog boxes in Microsoft Excel,double-clicking an option button or an item in a standard list box will activate the default button if one has been set.

If you don't want the default button to be activated when you double-click an option button or an item in a standard list box, you must turn off the Default attribute for all of the buttons in the dialog box. The following steps describe how to do this:


 * 1) Select any button in the dialog box.
 * 2) On Format menu, click Object.
 * 3) Click the Control tab.
 * 4) Clear the Default check box and click OK to accept the change.
 * 5) Select the Default check box and click OK to accept the change.
 * 6) On the Format menu, click Object again.
 * 7) Select the Control tab.
 * 8) Clear the Default check box and click OK to accept the change.

The default button in the dialog box is disabled.

MORE INFORMATION
When you create a custom dialog box in Microsoft Excel, one button in the dialog box may be set as the default button. The default button is surrounded by a thicker, darker border than other buttons, and is special in that if you press the ENTER key, the default button will be activated if no other button currently has the focus.

To set a button to be the default button:


 * 1) Select the button that you want to be the default button.
 * 2) On the Format menu, click Object.
 * 3) Select the Control tab.
 * 4) Select the Default check box.
 * 5) Click OK to accept the change.

Note that only one button in a dialog box can be the default button.

If you set a button to be the default button, double-clicking an option button or an item in a standard list box will activate the default button, just as if you had pressed the ENTER key. You cannot activate the default button by double-clicking a check box, edit box, spin control, or scroll bar, or by selecting an item in drop-down list.