Macros come with risks—it’s possible for people to create malicious macros that can infect your computer with malware when you open them. That’s why macros are disabled by default in Excel. Turning them back on is simple enough to do, however. Here’s how to enable or disable macros in Excel.
What Are Macros?
A macro is a set of instructions that tells Excel to perform an action or sequence of actions. They can save you from performing repetitive tasks in Excel. In their simplest form, you can record a sequence of actions in Excel and save them as a macro. Running your macro will then perform that same sequence of actions as many times as you wish. For example, you might want to insert multiple sheets into your document. Inserting them one at a time isn’t ideal, but a macro can insert as many sheets as you would like by repeating the same steps for you, over and over again. You can make macros even more powerful by using the Visual Basic (VBA) programming language to write your own macros rather than merely recording them. This allows you to create highly complex macros that can do almost anything you wish.
Why Would You Want to Disable Macros in Excel?
Macros can make your life easier, but there is a risk when using them. That’s because when you open a file created by someone else that contains macros, you have no idea what those macros are. It is possible to insert macros into Excel documents that can cause serious harm to your computer. These malicious macros can spread viruses and other forms of malware, which can have serious consequences. For this reason, macros are disabled by default in Excel. When you open a document containing macros, you will be asked to confirm that you want to enable macros. You should only do so if you trust the document. Even if it was sent to you from someone you know, you should be wary. Many macro viruses will access contact lists and send out emails from your account, allowing the viruses to spread.
How to Enable Macros in Excel
If you are certain that a document containing macros is safe, enabling macros in the document is quick and easy to do. Excel works slightly differently on Windows and Mac, so the exact steps will depend on the operating system that you’re using.
How to Enable Macros in Excel on Windows
When you open an Excel file containing macros on Windows, by default you’ll get a notification that the file contains macros and be given the option to enable or disable them. You can also choose to permanently enable macros for any files that you open. To enable macros in Excel on Windows:
Open the Excel file containing macros—you will see a warning just above the formula bar.To enable macros, click Enable Content. If you don’t click this button, you can continue to use the spreadsheet as normal, but you won’t be able to run any macros.
If you find yourself clicking this button every time you use Excel, you can change the default settings so that macros are automatically enabled for all Excel files. You should only do this if you’re certain that the files you are opening are safe. To permanently enable macros in Excel on Windows:
Open any Excel file.Click File. Select Options at the very bottom of the menu. Click the Trust Center menu. Click the Trust Center Settings button. Select the Macro Settings menu. Click the Enable VBA Macros radio button. Click OK.Close your document. When you open any Excel document from now on, macros will automatically be enabled.
How to Enable Macros in Excel for Mac
If you’re using Excel for Mac, you can enable macros directly through the document that you’re opening. You can also opt to always enable macros for every file you open. To enable macros in Excel for Mac:
Double-click the file you want to open as you normally would. You will see a pop-up warning you that the file contains macros.Click Enable Macros to open the file with macros enabled. If you don’t trust the document, click Disable Macros and the file will open, but all macros will be disabled. You can now use your Excel file as usual.
If you disable macros when you open a document, there’s no way to enable macros for that document without closing the file and opening it again. You can, however, change the default setting so that macros are always enabled when you open any Excel file. You should only do this if you’re certain that the files are safe to open, however. To permanently enable macros in Excel for Mac:
Open any Excel file.Click Excel in the menu bar. Select Preferences. Click the Security icon. Select Enable All Macros. If the file you opened initially contains macros, you’ll need to close it and open it again for the new setting to take effect.
How to Disable Macros in Excel
If you’re concerned about the risks from malicious macros, you can choose to disable macros by default. There are two options. The first is to disable macros by default, but keep the notification that the file contains macros that will appear when you open the file. You can then decide whether or not to enable macros for that file. The second option is to disable macros by default and remove the notification. This is useful if you never want to enable macros, as it means you don’t see the same pop-up notification every time you open a file containing macros.
How to Disable Macros in Excel on Windows
The methods for disabling macros are slightly different depending on your operating system. To disable macros in Excel on Windows:
Open any Excel document.Click File. At the bottom of the menu, select Options. Select the Trust Center menu. Click Trust Center Settings. Select Macro Settings. If you want macros to be disabled, but to still have the option to enable them via the message above the formula bar, click the Disable VBA Macros With Notification radio button. If you want macros to be disabled, and you don’t want to see the notification, click the Disable VBA Macros Without Notification radio button. You can also choose to only enable macros that have been digitally signed. Click OK to save your settings. You may need to close and re-open your file for the new settings to take effect.
How to Disable Macros in Excel on Mac
If you’re using Excel for Mac, you’ll need to do things a little differently. To disable macros in Excel for Mac:
Open any Excel file.Click the Excel menu in the menu bar. Select Preferences. Click the Security icon. To disable macros but keep the notifications, select Disable All Macros With Notification. To disable macros and stop the notifications, select Disable All Macros Without Notification. You’ll need to close and re-open the current file for the new changes to take effect for that file.
Do More With Excel
Macros can be incredibly useful when working in Excel, but they do come with risks, especially if you’re unsure of the macro’s true source. Knowing how to enable or disable macros in Excel can ensure that you get all the benefits of macros without putting your computer at risk. Macros are just one way you can harness the impressive power of Excel. For example, it’s possible to create stunning 3D maps in Excel. You can use web scraping to import data into Excel directly from the web. You can even have Excel ring an alarm when your data hits certain values. Comment
Δ