Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Getting Rid of the "Enable Macros" Notice.
by Allen Wyatt
(last updated April 10, 2020)
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.
Of course, there is a technique that may be much simpler for your needs: Just use the Save As command and change the file type to an XLSX file. These workbook files cannot contain macros, so any macros that are in the current workbook are stripped out in the saving process.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10399) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Getting Rid of the "Enable Macros" Notice.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Need to know how to generate a full month name based on a date? It's easy to do, as discussed in this tip.Discover More
The undo list can be a lifesaver when working in a macro. Unfortunately, the undo list is not preserved when you run a ...Discover More
Want a quick way to convert positive values to negative and vice versa? You can create your own plus/minus button by ...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 ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.