MXL5: Accelerator Key for Dialog Box Button May Not Run Macro

Last reviewed: October 27, 1997
Article ID: Q175700
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SYMPTOMS

If you press the accelerator key for a command button in a custom Microsoft Excel dialog box, the macro assigned to that button may not run.

CAUSE

This problem may occur if all of the following conditions are true:

  • You add a button to a dialog sheet.

    -and-

  • You assign an accelerator key to that button.

    -and-

  • You also add a list box, a combination list and edit box, a combination drop-down edit box, or an edit box on the same dialog sheet.

When the dialog box is displayed with these controls, one of them has the default focus. So, when you press the accelerator key that is assigned to the button, that keystroke is received by the control with the focus.

RESOLUTION

To resolve this problem, press and hold the COMMAND key while you press the accelerator key for the button.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

REFERENCES

For more information about dialog boxes in Visual Basic, click Search in Microsoft Excel Help, type the following text:

   dialog boxes

and then double-click the selected text to go to the "Keys for Working in Dialog Boxes" topic.

Keywords          : xlmac xlvbainfo kbprg
Version           : MACINTOSH:5.0,5.0a
Platform          : MACINTOSH


================================================================================


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: October 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.