Microsoft KB Archive/160485

= XL97: Cannot Run Macro from Macros Dialog Box =

Article ID: 160485

Article Last Modified on 10/10/2006

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q160485





SYMPTOMS
You cannot run a Microsoft Visual Basic for Applications macro from the Macros dialog box.

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 and later, 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 or Microsoft Excel 98 Macintosh Edition.   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, follow these steps:


 * 1) Open the workbook.
 * 2) Press ALT+F11 to open the Visual Basic Editor, or press OPTION+F11 in Microsoft Excel 98.
 * 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, or press F6 in Microsoft Excel 98.
 * 6) Change the (Name) property of the module to a valid module name.
 * 7) Press ALT+Q to switch to Microsoft Excel, or press COMMAND+Q in Microsoft Excel 98.

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.

Additional query words: 97 XL97 8.0 8.00 dialog box gray grayed

Keywords: KB160485

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.