XL97: Macro Virus Warning Appears Opening File Without Macros

Last reviewed: January 7, 1998
Article ID: Q171661
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

When you open a Microsoft Excel workbook, you may receive the following message:

   The workbook you are opening contains macros. Some macros may contain
   harmful viruses. If you are sure this workbook is from a trusted
   source, click Yes. If you are not sure and want to prevent any macros
   from running, click No.

You receive this message even when no macros exist in the workbook.

CAUSE

You may receive this error message when the following conditions are true:

  • You run a macro similar to the following to create the workbook:

          Sub Make_Book()
    
            Dim x As Workbook
            Application.DisplayAlerts = False
            Set x = Workbooks.Add
            x.Worksheets(1).Delete
            x.Worksheets(1).Range("A1").Value = "test"
    
          End Sub
    
        -and-
    
    
  • You close, and then open the workbook created by this macro.

         -or-
    
  • The workbook contains a defined name that uses syntax to refer to nonadjacent cell ranges; however the define name actually refers to adjacent cell ranges.

        -and-
    
  • The last three row in the defined name are rows greater than or equal to row 600 and increase in value from left to right.

    For example, if you create a worksheet named "Plan," a defined name that refers to the following ranges causes the problem:

          =Plan!$A$1:$A$1,Plan!$A$1:$A$1,Plan!$A$1:$A$1,Plan!$A$1:$A$1,
    
             Plan!$A$1:$A$1,Plan!$A$1:$A$1,Plan!$A$1:$A$1,Plan!$A$1:$A$600,
             Plan!$A$601:$A$602
    
       NOTE: Other similarly defined names may also cause this behavior.
    
        -or-
    
    
  • The ThisWorkbook module is missing from the workbook in the Project Explorer window in Microsoft Visual Basic Editor.

RESOLUTION

To correct this problem, install Microsoft Excel 97 Service Release 1 (SR-1).

STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows. This problem was corrected in Microsoft Excel 97 SR-1.

For additional information about SR-1, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q172475
   TITLE     : OFF97: How to Obtain and Install MS Office 97 SR-1

MORE INFORMATION

In Microsoft Excel 97, the Macro Virus Protection feature is designed to prevent macro viruses, such as the ExcelMacro/Laroux virus, from running. If you select the Macro Virus Protection check box, you are prompted whether to make macros available whenever you open a workbook that contains macros.

Making Macro Virus Protection Available

To select Macro Virus Protection so that a warning message appears, follow these steps:

  1. On the Tools menu, click Options, and then click the General tab.

  2. Click to select the Macro Virus Protection check box.

The macro virus warning should not appear when you open a workbook that does not contain a macro.

REFERENCES

For more information about macro viruses, click the Office Assistant, type "macro virus", click Search, and then click to view "About viruses and workbook macros".

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office
               Program or Component


Additional query words: XL97 sr1
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 7, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.