Microsoft Knowledge Base

XL: Dialog Control Accelerator Key Is Case Sensitive When Add

Last reviewed: March 27, 1997
Article ID: Q123184
5.00 5.00c 7.00 7.00a | 5.00 5.00a
WINDOWS               | MACINTOSH
kbother

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
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SYMPTOMS

When you assign an accelerator key to a control in a dialog box in Microsoft Excel, the key that you assign is case sensitive. For example, if you assign the character "b" (lowercase), the first lowercase b in the text of the control is underlined as the accelerator key, even if an uppercase B appears first in the control text. However, when you run the dialog box, the accelerator key is not case sensitive; you can use the key in upper- or lower-case to select the object.

CAUSE

When you enter a dialog control accelerator key, the first character in the control text that matches the accelerator key that you entered is not necessarily the character that appears underlined when you display the dialog box. This behavior is by design of Microsoft Excel.

When you add an accelerator key to a dialog control, Microsoft Excel searches first for a character in the control text with the case that matches the accelerator key that you entered. If the control text doesn't contain a character with matching case, then the first character in the text that matches the accelerator key that you entered, regardless of case, is used.

For example, if you assign an accelerator key of "b" (lowercase) to an option button with the text "Bob" in a dialog box, the second "b" in the text "Bob" is the character that appears underlined when you display the dialog box.

Note that when you display the dialog box, the accelerator key is not case sensitive; that is, the control is selected when you press either "b", ALT+B or ALT+SHIFT+B (COMMAND+B or COMMAND+SHIFT+B on the Macintosh).

REFERENCES

"Visual Basic User's Guide," version 5.0, Chapter 11, "Controls and Dialog Boxes"

For more information about the Control Tab, Object Command (Format Menu), choose the Search button in Help and type:

   Control tab, Format Object command


KBCategory: kbother
KBSubcategory:
Additional reference words: 5.00 5.00c 7.00
Keywords : kbother
Version : 5.00 5.00c 7.00 7.00a | 5.00 5.0
Platform : MACINTOSH WINDOWS


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: March 27, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.