Microsoft KB Archive/329950

= &quot;Macros may contain viruses&quot; error message when you open files without macros in Excel =

Article ID: 329950

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition
 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q329950



SYMPTOMS
When you open a Microsoft Excel file that does not contain macros, you receive the following error message:

contains macros.

Macros may contain viruses. It is always safe to disable macros, but if the macros are legitimate, you may lose some functionality.

To close the error message, click Disable Macros, Enable Macros, or More Info.



CAUSE
This behavior may occur if the Excel file contained a macro that was deleted, but the Microsoft Visual Basic for Applications (VBA) module that contained the macro was not deleted.



RESOLUTION
To resolve this behavior, delete the empty VBA module. To do this, follow these steps:  Open the Excel file, and then click Disable Macros when you receive the error message. Press ALT+F11 to start the Microsoft Visual Basic Editor. In the Project Explorer window, locate the file name. For example, locate &quot;VBAProject .xls&quot; (without quotation marks). Expand the Object list. Expand the Module list. Select any module that appears under the Modules list, right-click the module, and then click Remove  on the File menu. (The module is probably named &quot;Module1,&quot; &quot;Module2,&quot; &quot;Module4,&quot; or a similar name).

Click No when you receive the following message:

Do you want to export  before removing it?

</li> Close the Visual Basic Editor, and then save the Excel file.</li></ol>

Additional query words: prb XL2002 XL2000 XL2003 Excel XL macros enable disable VBA module empty

Keywords: kbmacro kbopenfile kberrmsg kbprb KB329950

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.