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 Open Add-In Error When Running a Macro


View products that this article applies to.

This article was previously published under Q213527

↑ Back to the top


Symptoms

When you run a Visual Basic for Applications macro in Microsoft Excel, you may receive the following error message:
Run-time error '1004': Cannot open Microsoft Excel Add-In for editing. Please edit the source document instead.

↑ Back to the top


Cause

This problem occurs when you run a macro that opens an add-in (*.xla) file, and you run the macro by pressing a shortcut key combination that includes the SHIFT key. For example, you press the following keystroke:
CTRL+SHIFT+T

↑ Back to the top


Workaround

To work around this problem, only assign shortcut key combinations that do not include the SHIFT key to run macros that open any type of file.

↑ 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


More information

When you create a Visual Basic macro in Microsoft Excel, you can assign a shortcut key to the macro. When you press the shortcut key, Microsoft Excel runs the macro to which you assigned the shortcut key. To assign a shortcut key to a macro, follow these steps:
  1. On the Tools menu, point to Macro, and click Macros.
  2. In the list of macros, click the macro to which you want to assign a shortcut key and then click Options.
  3. Type a single letter in the Shortcut key box.
  4. Click OK. Click Cancel.

↑ Back to the top


Keywords: KB213527, kbpending, kberrmsg, kbbug

↑ Back to the top

Article Info
Article ID : 213527
Revision : 5
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 233