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 | MACINTOSHkbother The information in this article applies to:
SYMPTOMSWhen 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.
CAUSEWhen 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
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |