How to Enable Macros in Excel (2025): Step-by-Step Guide
Last Updated :
11 Apr, 2025
How to Activate Macros in Excel – Quick Steps
- Open the Excel workbook.
- Click Enable Content in the yellow security warning bar.
- Go to File > Options > Trust Center > Trust Center Settings > Macro Settings.
- Choose the desired macro setting (e.g., Enable All Macros for trusted files).
- Save the file as .xlsm to retain macros.
Macros in Excel allow you to automate repetitive tasks and improve productivity, but before you can use them, you need to make sure they’re properly enabled. Whether you’re working on a single project or using macros across multiple files, understanding the correct steps for enabling Excel macros is essential. In this guide, you’ll learn how to enable macros for a single workbook, adjust settings to allow macros across all documents, and create trusted locations to avoid security prompts. We’ll also cover how to enable macros in Excel on Mac, so no matter your setup, you can start activating macros in Excel with confidence and control.
Method 1: Enable Macros for a Single Workbook
When opening a workbook containing macros in Excel, you may encounter a yellow security warning bar indicating that macros are disabled due to default security settings. Follow these steps to temporarily enable macros for the individual session:
Step 1: Open the Workbook with Macros
- Open the Excel file that contains the macros.
- If the workbook contains VBA code or macros, Excel will detect them and display a security warning.
Step 2: Locate the Yellow Security Warning Bar
- Once the workbook opens, look for a yellow security warning bar below the ribbon at the top of the screen.
- The warning informs you that macros have been disabled for safety reasons.
- The message typically says: “Macros have been disabled“ or “Some content has been disabled.“

Click on “Enable Content”
Step 3: Click “Enable Content”
- To activate the macros, click the “Enable Content” button in the yellow security warning bar.
- This will temporarily enable the macros for the current session, allowing them to execute until the workbook is closed.
Important: Clicking “Enable Content” does not mark the file as trusted for future sessions. The file will remain untrusted unless you adjust the security settings permanently.
Step 4: Confirm Macro Activation (If Prompted)
- If the workbook contains advanced features like VBA code in the Visual Basic Editor (VBE), a Microsoft Excel Security Notice dialog box may appear.
- The dialog will ask you to confirm whether you trust the macros:
- “Enable Macros”: Click this if you trust the source and are confident that the macros are safe.
- “Disable Macros”: Select this if you do not trust the file or want to avoid running macros.
If you are sure that the file is from a trusted source, select “Enable Macros” to proceed.

Click on “Enable Macros”
Step 5: Use Macros with Caution
Once macros are enabled, they will function as intended, executing automated tasks, scripts, or custom functions.
Keep in mind:
- The macros will only remain active for this session.
- If you close and reopen the workbook, macros will be disabled again unless you adjust permanent security settings.
Method 2: Change Macro Settings for All Workbooks
If you want macros to be enabled by default in all your Excel workbooks, you need to modify the macro security settings in the Trust Center. This ensures that Excel automatically permits the execution of VBA code across all workbooks without prompting you to enable macros each time. Follow these steps to permanently enable macros in Excel for Windows, Mac, or Office 365:
Step 1: Open Excel and Access the File Tab
Start by opening Microsoft Excel. Click on the File tab located at the top-left corner of the Excel window.

Click on the File Tab
Step 2: Click on Options
In the File menu, scroll down and select Options. This opens the Excel Options dialog box where you can customize various settings for Excel.

Go to Files>> Select options
Step 3: Navigate to the Trust Center Settings
In the Excel Options window, look at the list on the left-hand side and select Trust Center. This is where Excel manages its security settings, including macros and other potentially unsafe content.
Once you’ve selected Trust Center, click on the Trust Center Settings button on the right side of the window. This opens a new window where you can modify security settings in detail.

Click on “Trust Center Settings” >> Go to Trust Center
Step 4: Go to Macro Settings
In the Trust Center dialog box, select Macro Settings from the list on the left-hand side. This section controls how Excel handles macros and VBA code execution.
Step 5: Enable Macros
You will now see several options for macro security. To enable all macros by default, select the option Enable all macros (not recommended; potentially dangerous code can run). This option allows any macro in any Excel file to run without prompting you for confirmation.
Warning: Enabling this option can expose your computer to potentially harmful macros from untrusted sources. It’s only recommended if you are confident in the security of the files you work with regularly.

Click “Ok”
Step 6: Confirm the Changes
After clicking OK, the macro settings will be updated, and macros will be enabled automatically in all your Excel workbooks by default.
This change will apply to any workbook you open in the future. There’s no need to manually enable macros for each session.
Note: The option you select in the Trust Center becomes the new default macro setting for all of your Excel files. Instead, if you only want to enable macros for specific workbooks, save them in a trusted location.
Method 3: Enable Macros for Trusted Locations
Follow these steps to enable macros for files stored in trusted locations:
Step 1: Set Trusted Locations
- Go to File > Options > Trust Center > Trust Center Settings > Trusted Locations.
- Add folders where you store files with macros.
Step 2: Enable All Macros for Files in Trusted Locations
- Any Excel file saved in these folders will automatically enable macros without showing warnings.
How to Enable Macros in Excel on Mac
Folllow the below steps to Enbale Macros in Excel on Mac:
Step 1: Open Excel and Go to Preferences
Click Excel > Preferences in the top menu.
Step 2: Access Security & Privacy
In the Preferences window, click Security & Privacy.
Step 3: Adjust Macro Settings
- Under the Macro Security section, choose your desired option:
- Disable All Macros With Notification (recommended).
- Enable All Macros (not recommended unless the source is trusted).
Step 4: Save Changes
Close the Preferences window. Macro settings will apply to all workbooks
Security Best Practices for Enabling Macros
Here are some essential security practices to follow when enabling macros in Excel:
- Enable Macros Only for Trusted Files: Only enable macros for files from trusted sources to avoid malicious code.
- Use Digitally Signed Macros: Trust macros signed by verified developers to reduce security risks.
- Use Trusted Locations: Store macro-enabled files in folders marked as trusted locations.
- Backup Your Data: Before running a macro, save a backup of your workbook to avoid accidental data loss.
- Monitor Security Settings: Regularly review and update your macro settings in Excel.
Common Issues and Troubleshooting
Enabling macros in Excel can sometimes lead to issues, especially if security settings or file permissions are not properly configured. Below are some common problems and their solutions to help you resolve them effectively:
1. Why is the “Enable Content” Button Missing?
- The file might already be in a trusted location, so macros are enabled automatically.
- The macro may be blocked by system policies. Check with your IT administrator.
2. Why Are Macros Still Disabled After Enabling?
- Ensure the workbook is saved as a Macro-Enabled Workbook (
.xlsm
).
- Check if macros are disabled by group policy or antivirus software.
3. Can I Enable Macros Temporarily?
- Yes, macros can be enabled temporarily for a single session by selecting Enable Content in the Security Warning banner.
Conclusion
Now that you know the different methods for enabling Excel macros, you can choose the option that best fits your workflow and security preferences. Whether you’re activating macros in Excel for just one workbook, changing default settings for all files, or working on a Mac, the process is straightforward once you know where to look. With macros enabled, you’re ready to automate tasks and streamline your work inside Excel more efficiently and effectively.
Similar Reads
How to Make a Calendar in Excel: Step by Step Guide
Creating a calendar in Excel is a practical solution for personal and professional scheduling, offering flexibility and customization options. Whether you want to use built-in Excel Calendar 2025 templates or design a dynamic calendar with formulas, PivotTables, or VBA calendar creation, Excel provi
6 min read
How to Insert a Checkbox in Excel: Step-by-Step Guide
How to Add Checkboxes in Excel: Quick Steps Enable the Developer Tab >>Go to Developer TabControl Group >> Click InsertSelect Checkboxes >>Place the CheckboxesLink the Checkbox to a CellCreating a checklist or adding interactive elements to your spreadsheet in Excel becomes much ea
8 min read
How to Create a Form in Excel - A Step by Step Guide
Creating forms in Excel is an efficient way to capture and organize data, whether youâre tracking inventory, collecting survey responses, or entering client information. Excel forms are customizable and easy to use, making data entry faster and more organized, especially when handling large datasets
7 min read
How to Add a Column in Excel: Step-by-Step Guide
Need to organize your data better in Excel but unsure how to add a column without disrupting your existing setup? Whether youâre working with a simple list or a complex table, inserting columns is a fundamental skill that increases productivity and keeps your data structured. This guide covers 4 eas
6 min read
How to Swap Columns in Excel: Step-by-Step Guide
To Swap Columns in Excel - Quick StepsDrag and Drop: Select a column, drag it to a new position, and release.Cut and Paste: Cut a column (Ctrl + X) for Windows and (Cmd + X) for Mac, then paste it in the new location using Insert Cut Cells.Copy and Paste: Copy a column, then insert the copied cells
8 min read
Macros In Excel With Examples: Step-by-Step Tutorial
Excel macros are a powerful tool that can automate repetitive tasks, saving you time and increasing productivity. Whether you're trying to enable Excel macros, record a macro in Excel, or automate specific actions within your spreadsheet, macros are an invaluable feature. In this guide, we will walk
12 min read
How to Lock Cells in Google Sheets : Step by Step Guide
Have you ever shared a Google Sheet, only to discover that important data or formulas were accidentally changed? Learning how to lock cells in Google Sheets from editing is essential for maintaining the accuracy and security of your data. Whether youâre looking to protect crucial formulas, set restr
7 min read
Pivot Tables in Excel - Step by Step Guide
Pivot tables are one of the most powerful features in Excel, allowing you to quickly summarize, analyze, and visualize large sets of data. Whether youâre dealing with sales data, financial reports, or any other type of complex dataset, knowing how to create pivot tables in Excel can make your data a
7 min read
How to Enable & Run a Macro in Excel? 6 Ways
We can record a macro in Excel or write from scratch in VB Editor. Excel provides different options to run a macro. In this article, we explore four different approaches to running a macro in an Excel application. Even while executing an Excel macro is a straightforward process for seasoned users, i
5 min read
How to Create a Graph in Excel: A Step-by-Step Guide for Beginners
Anyone who wants to quickly make observations and represent them graphically should know how to create graphs with Excel. Whether it is the preparation of business analysis papers, academic research documents or financial reports among other things, learning how to make graphs in Excel can significa
8 min read