Microsoft KB Archive/68918

{| = Assigning Shortcut Keys to Edit Boxes in a Custom Dialog Box =
 * width="100%"|

Last reviewed: November 3, 1994

Article ID: Q68918 The information in this article applies to:
 * Microsoft Excel for Windows, version 3.0

SUMMARY
If you want to implement ALT+ shortcut keys to activate custom dialog box edit boxes (items 6-10); list boxes (item 15); or drop-down list boxes (item 21); you must precede the item number with a fixed text item (item 5) in the dialog box definition. The text column of 5 must have an ampersand (&) preceding the letter that will be the ALT+, where  is the letter that will be underlined in the fixed text when the dialog box is displayed.

MORE INFORMATION
For example, below is a sample dialog box definition:

Item   x     y       Width   Height  Text  Init/Result -    -       -   --    ---

Box dimensions                       200     100 Fixed text     5       10    6                       &Name Text edit box  6       10    21      160                     123 Notice that the word Name is preceded with an & in the text column for item number 5. Also notice that item number 5 is immediately followed by an edit box (item 6) to be activated by the ALT+ combination. When this custom dialog box is displayed, the N in the fixed text Name will be underlined. When you press ALT+N, the cursor will appear in the text edit box. Linked list boxes (item 16), linked file and drive boxes (items 18 & 19), and drop-down combination edit/list boxes (item 22) must all be preceded by a text edit box (item 6) and can therefore be activated in the same way as the edit boxes.