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.

XL2002: Excel Opens Workbook in Repair Mode When Workbook Contains Macros


View products that this article applies to.

This article was previously published under Q287105

↑ Back to the top


Symptoms

When you open a workbook in Microsoft Excel, you may receive an error message similar to the following
Errors were detected in file name, but Microsoft Excel was able to open the file by making the repairs listed below. Save the file to make the repairs permanent.

Lost Visual Basic project.
Lost ActiveX controls.
where file name is the file that you are opening.

↑ Back to the top


Cause

This behavior can occur if all the following conditions are true:
  • Microsoft Visual Basic for Applications (VBA) is configured to be installed on first use.
  • You open a workbook that contains macros.
  • When prompted to install VBA, you cancel the installation.

↑ Back to the top


Resolution

To resolve this issue, follow these steps to install VBA:
  1. Start Excel.
  2. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  3. When prompted to install VBA, click Yes.

↑ Back to the top


Workaround

To work around this issue without installing VBA, follow these steps:
  1. Click Start, point to Settings, and then click Control Panel.
  2. Double-click Add/Remove Programs.NOTE: Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.

  3. In the Currently installed programs list, click Microsoft Office XP or Microsoft Excel 2002, and then click Change.
  4. Click Add or Remove Features, and then click Next.
  5. In the Features to install list, click the plus sign (+) next to Office Shared Features, click the icon next to Visual Basic for Applications, and then click Not Available.
  6. Click Update.
  7. You may receive a dialog box explaining what features of Microsoft Office require VBA to be installed. If you do not need these features, click Yes to remove any existing installation of VBA and to prevent VBA from being installed in the future.
  8. When Office XP setup is complete, click OK.
  9. In the Add/Remove Programs dialog box, click Close.


If the VBA feature is not installed, you must install it. To do so, follow these steps:
  1. In Control Panel, double-click Add or Remove Programs.
  2. In the Currently installed programs list, click Microsoft Office XP or click Microsoft Excel 2002, and then click Change.
  3. Click Add or Remove Features, and then click Next.
  4. In the Features to install list, expand Office Shared Features, click the icon next to Visual Basic for Applications, click Run from My Computer, and then click Update.
After you follow these steps, start Excel to see if VBA is functioning.

↑ 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


References

For additional information about problems in Excel without VBA installed, click the article number below to view the article in the Microsoft Knowledge Base:
287104� XL2002: Initialization Error Message When You Cancel the Installation of VBA

↑ Back to the top


Keywords: KB287105, kbpending, kberrmsg, kbbug

↑ Back to the top

Article Info
Article ID : 287105
Revision : 8
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 360