Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Getting Rid of the "Enable Macros" Notice.
Written by Allen Wyatt (last updated January 26, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003
The VBA programming language included with Excel allows you to create very powerful macros. It is not uncommon to record a couple of macros for a workbook, each designed to accomplish a quick little task. When you create the macros, Excel adds what is called a module to your workbook. This module is used to store the macros that you record or create.
You may notice that every time you open a workbook that contains macros, Excel asks you if you want to enable the macros. This is part of the security system built into Excel. (This system has saved my bacon on more than one occasion.) You may also have noticed that if you delete all the macros in your workbook, Excel still asks you if you want to enable macros when you later open the workbook.
Why would Excel do this? After all, you deleted all the macros in the workbook, right? The reason is that the module automatically created by Excel to hold your macros is not automatically deleted when you get rid of the last macro—it's still there. As long as the module is there, Excel will dutifully ask you if you want to enable your macros whenever you load the workbook.
To overcome this problem (and get rid of the macro prompt for this particular workbook), follow these steps:
At this point your workbook contains no modules, and you will not get any notification when you subsequently open it.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2587) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Getting Rid of the "Enable Macros" Notice.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
When creating a workbook to be used by others, you may want any worksheets they add to the workbook to contain some ...Discover More
Want to use a worksheet function (such as SUM) from within a macro? Here's how easy it is to accomplish the task.Discover More
Macros can be used for all sorts of data processing needs. One need that is fairly common is the need to move data from ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.