HTML tutorials for the rest of us...
Excel: No Macros

All of a sudden, when I open the (.xls) file, it asks if I want to "Enable or Disable a Macro". There are no macros in this workbook.

A macro has been added and then removed, leaving an empty module. Empty modules trigger the macro query, as does an actual macro.


  1. Warning: As a precaution, you should make a backup copy of the file, before you remove any code.
  2. Right click on any sheet tab and choose View Code, to open the Visual Basic Editor.
  1. In the Project Explorer at the left of the screen, find the workbook. In the sample shown here, Book4 is the workbook name -- VBAProject (Book4)
  2. Look for a Modules folder, and open it. (If there is no Modules folder, go to Step 6.)
  3. For each module in the folder:
    1. Right-click on the module name.
    2. Choose Remove Module1 (the name of your module may be different)
    3. Click No when asked if you want to Export.
  1. Open the Microsoft Excel Objects folder.
  2. For each worksheet, and for ThisWorkbook:
    1. Double-click on the object name, to open its code module. In this sample, you'd double-click on Sheet1 (Sheet1)
    2. On the keyboard, press Ctrl+A to select all the code (even if the code module looks empty)
    3. Press the Delete key.

  1. Look for a Forms folder, and open it.
  2. Delete any UserForms that it contains.
  3. Look for a Class Modules folder, and open it.
  4. Delete any class modules that it contains.
  1. Close the Visual Basic Editor.
  2. Save the changes to the workbook.

A macro to remove all VBA code in a workbook is available at Chip Pearson's web site: