Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Cannot Run Macro from Macros Dialog Box


View products that this article applies to.

This article was previously published under Q213229

↑ Back to the top


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.

↑ Back to the top


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
				

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


Keywords: KB213229, kbpending, kbbug

↑ Back to the top

Article Info
Article ID : 213229
Revision : 6
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 227