Microsoft KB Archive/287105

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

Article ID: 287105

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Excel 2002 Standard Edition

-



This article was previously published under Q287105





SYMPTOMS
When you open a workbook in Microsoft Excel, you may receive an error message similar to the following

Errors were detected in, 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  is the file that you are opening.



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.



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.



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.


 * 1) In the Currently installed programs list, click Microsoft Office XP or Microsoft Excel 2002, and then click Change.
 * 2) Click Add or Remove Features, and then click Next.
 * 3) 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.
 * 4) Click Update.
 * 5) 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.
 * 6) When Office XP setup is complete, click OK.
 * 7) 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.



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

