XL: Assigning an Access Key to a Custom Dialog Box Control

Last reviewed: September 13, 1996
Article ID: Q104840
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a

SUMMARY

In Microsoft Excel, to assign an access key to a control in a custom dialog box, set the Accelerator Key property. You can set this property for labels, option buttons, check boxes, command buttons, or group boxes.

To set the accelerator key for a dialog box control:

  1. In a dialog sheet, select the desired control.

  2. From the Format menu, choose Object.

  3. Select the Control tab.

  4. In the Accelerator Key box, type a single letter or number.

  5. Choose OK to accept the change.

When you run the dialog box, you can activate that control by pressing ALT+<n> (where <n> is the letter or digit you typed in the Accelerator Key box).

NOTE: You cannot use access keys with On Worksheet controls. Controls must be in a custom dialog box in order for access keys to function.

MORE INFORMATION

In earlier versions of Microsoft Excel, to create accelerator keys in custom dialog boxes, you use the ampersand character (&).

REFERENCES

"Visual Basic User's Guide," Chapter 11


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00 7.00



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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.