Assigning Shortcut Keys to Edit Boxes in a Custom Dialog Box

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+<KEY> 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+<KEY>, where <KEY> 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+<KEY> 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.

REFERENCES

"Microsoft Excel User's Guide," version 3.00, page 641


KBCategory: kbother
KBSubcategory:

Additional reference words: 3.0 3.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: November 3, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.