XL2000: Cannot Run Macro from Macros Dialog Box (213229)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q213229

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 behavior can 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, versions 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 Excel 97 and later versions of Excel.
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 so, follow these steps:
  1. Open the workbook, and then press ALT+F11 to open the Visual Basic Editor.
  2. On the View menu, click Project Explorer to view the Project Explorer window.
  3. Double-click the Modules folder for the workbook.
  4. Select the module and press F6 to display the properties for the module.
  5. Change the (Name) property of the module to a valid module name.
  6. Press ALT+Q to switch to Microsoft Excel. You can now run the macro from the Macros dialog box.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbpending KB213229