Microsoft KB Archive/104936

From BetaArchive Wiki

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.


KBCategory: kbusage

KBSubcategory:

Additional reference words: 7.00 5.00 visual basic focus



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 13, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.