Whether you’re an Excel beginner or a power user, macros boost your productivity by performing repetitive tasks. Macros are small programs or scripts in VBA (Visual Basic for Applications) codes that make your workflow efficient while dealing with complex workbooks. While macros are useful, they pose security risks when you open an Excel file from untrusted sources. Disabled by default, here’s how to tweak macros settings in Microsoft Excel.
Microsoft offers Excel apps for Windows, Mac, iPhone, iPad, Android, and on the web to make tweaks from a
Chromebook
. However, you can change macro security settings only from the desktop apps.
The best Excel templates for every use case
There’s an Excel template for anything you want to do
What is a macro in Microsoft Excel?
Before we start, let’s take a quick look at macros in Microsoft Excel. Macros are small programs that automate daily tasks in Excel. Macros are available in all Microsoft Office apps, including Word, PowerPoint, and Excel.
A macro records your keystrokes and mouse clicks and lets you execute complex tasks with a single click. Macros can be timesavers for Microsoft 365 users. For instance, you can create a macro and add a formatted table to an Excel sheet or your business letterhead in a Word document in no time. The possibilities are endless.
Advantages of using macros in Excel
Here are a couple of benefits of using macros in Excel.
- Save time with tedious, repetitive tasks: Create macros and combine your repetitive clicks and keystrokes.
- Reduce errors: Manually entering repetitive spreadsheet data can lead to errors. A macro helps you eliminate such errors.
Dangers of using macros in Excel
Before you activate macros on all Excel workbooks, it’s important to understand the consequences of using them. A malicious macro can corrupt your files, steal your data, infect your PC with malware, and put your PC at security risk. That’s why Microsoft disables macros by default in all Microsoft 365 apps.
Enable or disable macros in Excel for Windows
You can manage macros for all your workbooks from Trust Center settings. Follow the steps below to make changes.
- Launch Excel on Windows.
- Select File in the upper-left corner.
- Select More and click Options.
- Select Trust Center and open Trust Center Settings.
- Go to Macro Settings and find different options to choose from.
Here’s an explanation of the options available in Macro Settings:
- Disable VBA macros without notification: Blocks all macros without a warning message. Avoid this option since you can’t run any macro, even if they are safe and trusted.
- Disable VBA macros with notification: The default behavior of VBA macros with a security warning.
- Disable VBA macros except digitally signed macros: Disables all macros except ones digitally signed by trusted publishers. If a macro is signed by an untrusted publisher, you see a warning message with an option to enable the macro.
- Enable VBA macros (not recommended; potentially dangerous code can run): Enables macros without any conditions. It’s the least secure option and exposes your PC to malicious code.
Enable macros for a single Excel file
When you open an Excel file from untrusted sources, Microsoft blocks macros from running and shows a security risk warning. You can tweak file properties and run macros without a warning banner.
- Launch File Explorer and go to the location where you saved the Excel file.
- Right-click the file and select Properties from the context menu.
- Under Security, click the checkmark beside Unlock and select Apply. Click OK.
Enable macros for a trusted location on a PC
A trusted location marks all your files safe and opens them without a warning message. Trust Center doesn’t check files from trusted locations and enables all macros.
Microsoft Excel treats the added location as a trusted source for opening files. Make sure the new location is secure.
- Go to the Options menu in Microsoft Excel (refer to the steps above).
- Click Trust Center and head to Trust Center Settings.
- Select Trusted Locations from the sidebar. Click Add new location. You can also remove an existing trusted location, allow trusted locations on your network (not recommended by Microsoft), and disable all trusted locations.
- Select Browse. If you want to include subfolders in a trusted location, select Subfolders of this location are also trusted.
- When the File Explorer menu appears, find a folder you want to treat as a trusted location and click OK.
Enable or disable macros in Excel for Mac
Excel for Mac users can go through the steps below to manage macros.
- Open Excel on Mac.
- Select Excel at the top and select Preferences.
- Select Security under Sharing and Privacy.
- Check Macro Security options and click a radio button beside a relevant option.
These options are identical to the above. To learn about each macro security option, refer to the section above.
Understand macros settings in Excel
You can manage macro settings in Excel in various ways. We recommend enabling them for a single file or a trusted location. Switching on macros for all Excel files can put your PC or Mac at security risk.
Do you want to create and record macros to streamline repetitive data entries and formatting processes in Excel? Check out our guide for recording and running Excel macros.