Excel Enable Content: How to Unlock Macros and Data
In this article
To enable content in Excel, click the Enable Content button on the yellow Security Warning bar that appears at the top of the spreadsheet immediately below the ribbon. This action allows Excel to run macros, execute data connections, and load active content that is disabled by default to protect your computer from potentially malicious code. Depending on your version of Excel, the button may be labeled as "Enable Content" or "Enable All Content."
Excel uses a security feature called Protected View and a set of Trust Center settings to prevent unauthorized scripts from running automatically when you open a file from the internet or an untrusted source. When you see the security warning, it means the file contains "active content"—which could be a VBA macro, a Power Query connection, or an external data link—that Excel has paused for your safety. By clicking Enable Content, you are telling Excel that you trust the source of the file and the code contained within it.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An Excel file that contains active content (such as a .xlsm, .xlsb, or .xls file).
- Administrative rights to the computer if you intend to change global security settings in the Trust Center.
Step-by-Step
- Open the Excel File: Launch Microsoft Excel and open the specific workbook that requires content activation.
- Locate the Security Warning: Look for a yellow bar appearing just below the main menu ribbon. This bar typically says "Security Warning: Macros have been disabled" or "Security Warning: Automatic update of links has been disabled." Note that labels can differ slightly by version, device, or region.
- Click Enable Content: Click the button labeled Enable Content. Once clicked, the yellow bar will disappear, and the macros or data connections will begin to function.
- Verify Functionality: Test the feature that was blocked. For example, if the file had a button that triggered a macro, click that button to ensure the script now runs.
- Handling "Blocked" Files (Windows 10/11): If the yellow bar does not appear but macros still do not work, Microsoft may have blocked the file at the OS level because it came from the internet. To fix this:
- Close the Excel file.
- Right-click the file icon in your folder and select Properties.
- In the General tab, look for the "Security" section at the bottom.
- Check the box that says Unblock.
- Click Apply and then OK.
- Re-open the file and follow the Enable Content steps again.
- Setting a Trusted Location: If you use this file frequently and want to stop the warning from appearing every time:
- Go to File > Options.
- Select Trust Center from the left-hand menu.
- Click the Trust Center Settings... button.
- Select Trusted Locations.
- Click Add new location... and browse to the folder where your file is saved.
- Check "Subfolders of this location are also trusted" if applicable.
- Click OK on all windows. Now, any file in that folder will automatically enable content.
Common Mistakes
One of the most common mistakes users make is clicking "Enable Content" on files received from unknown email senders. Macros are powerful scripts that can interact with your operating system; if a file is malicious, enabling content can allow a virus or ransomware to install itself on your hard drive. Always verify the sender before clicking the button.
Another frequent error is confusing the "Enable Content" bar with the "Protected View" bar. Protected View is a read-only mode for files from the web. You must first click Enable Editing before the Enable Content button for macros will even appear. If you only enable editing, your macros will still be disabled.
Users also often forget that saving a file as a standard .xlsx workbook strips away all macros. If you wrote a macro and then saved the file as .xlsx, the content is gone. You must save the file as an Excel Macro-Enabled Workbook (.xlsm) or an Excel Binary Workbook (.xlsb) for the "Enable Content" prompt to be relevant in the future.
Tips
To keep your workflow efficient, use the "Trusted Documents" feature. When you click Enable Content, Excel remembers that you trusted that specific file. As long as the file is not moved or renamed, you won't see the warning again for that specific workbook. However, if you move the file to a different folder, Excel may treat it as a new file and prompt you again.
For those managing a team, it is better to set up a shared network folder as a "Trusted Location" in the Trust Center. This ensures that everyone with access to the folder can run the necessary tools without being interrupted by security prompts, provided the network path is added to the trusted list.
If you are an advanced user, you can check the Macro Settings within the Trust Center. While "Disable all macros with notification" is the safest and recommended setting, some users switch to "Enable all macros." This is strongly discouraged as it removes the safety barrier for every single file you open, leaving your system vulnerable.
Troubleshooting
If the Enable Content button does not appear or does not work, try these steps in order:
1. Check for Protected View: Ensure you have clicked "Enable Editing" first. If the file is in Protected View, the macro security bar is hidden until the file is editable.
2. Check File Extension: Ensure the file ends in .xlsm, .xlsb, or .xls. If it is a .xlsx file, it cannot contain macros, and there is no content to enable.
3. Unblock via File Properties: As mentioned in the step-by-step section, Windows often blocks files downloaded from the internet or received via email. Right-click the file > Properties > General > Unblock. This is the most common reason the "Enable Content" bar fails to appear in modern versions of Office.
4. Verify Trust Center Settings: Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Ensure that "Disable all macros without notification" is NOT selected. If this option is active, Excel will silently block all macros without ever showing you the yellow warning bar.
5. Check for Group Policy: If you are using a work computer and the options are greyed out, your IT department may have disabled macros via Group Policy. In this case, you cannot enable content yourself and must contact your system administrator to request an exception or a trusted folder.
Frequently Asked Questions
Is it safe to click Enable Content?
Only if you trust the person or organization that sent you the file. Macros can execute commands on your computer, so enabling content in a file from an unknown source is a security risk.
Why do I have to enable content every time I open the file?
This happens if the file is stored in an untrusted location or if the "Trusted Documents" registry key has been cleared. To stop this, move the file to a folder designated as a "Trusted Location" in the Trust Center settings.
What is the difference between Enable Editing and Enable Content?
Enable Editing allows you to change the text and data in a file that was opened in Protected View. Enable Content allows the file to run active scripts (macros) and refresh external data links.
Can I enable content for all files at once?
Yes, through the Trust Center Macro Settings by selecting "Enable all macros," but this is highly dangerous and not recommended for security reasons.
Will enabling content change my data?
Enabling content does not change your data automatically, but it allows the macros within the file to run. If the macro is designed to modify data, then yes, it will do so once triggered.
Does this work on Excel for the Web?
No. Excel for the Web has limited support for VBA macros. While you can view files, you cannot "Enable Content" to run traditional VBA macros in a web browser; you must open the file in the Excel Desktop App.