XL97: Cannot Run Macro from Macros Dialog Box

Last reviewed: November 21, 1997
Article ID: Q160485
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

You cannot run a Visual Basic for Applications macro from the Macros dialog box in the versions of Microsoft Excel listed above.

The macro is listed in the Macros dialog box; however, when you select the macro, the Run button is not available.

CAUSE

This problem may occur if the following conditions are true:

  • You originally created the workbook in Microsoft Excel 5.0 or 7.0.

    -and-

  • There is another Visual Basic module in the workbook that contains a macro with the same name.

    -and-

  • The module name contains one or more invalid characters.

In Microsoft Excel 97, module names may consist only of letters, numbers and underscore characters. The following characters, which are valid characters to use in module names in Microsoft Excel 5.0 and 7.0, are not valid characters for module names in Microsoft Excel 97.

   Character     Name
   --------------------------------------
                 Space
   $             Dollar Sign
   ~             Tilde
   !             Exclamation Point
   %             Percent
   &             Ampersand
   -             Hyphen
   {             Left brace
   }             Right brace
   (             Left parenthesis
   )             Right parenthesis
   `             Accent grave
   @             At sign
   '             Apostrophe
   +             Plus
   =             Equal sign
   ^             Accent circumflex, carat

RESOLUTION

To resolve this problem, change the name for the module to a valid module name. To do this, use the following steps:

  1. Open the workbook.

  2. Press ALT+F11 to activate the Visual Basic Editor.

  3. On the View menu, click Project Explorer to view the Project Explorer.

  4. Double-click the Modules folder for the workbook.

  5. Select the module and press F4 to display the properties for the module.

  6. Change the (Name) property of the module to a valid module name.

  7. Press ALT+Q to switch to Microsoft Excel.

You can run the macro from the Macros dialog box.

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.


Additional query words: 97 XL97 8.0 8.00 dialog box gray grayed
Keywords : xlvbainfo kbprg kbui
Version : 97
Platform : 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: November 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.