logo
search
VBA & Macro Problems

How to Enable Macros in a Trusted Excel or Office File

Phi Hung VoPhi Hung Vo Oct 8, 2026 869 views

Question details

The user needs to enable macros in an Office file that are currently being blocked by security settings.

How to Enable Macros in a Trusted Excel or Office File
Product
Microsoft Excel / Office
Device & OS
not provided
Scenario
Attempting to run custom or safe macros within an Excel or Office document.
Observed behavior
Office blocks the macros from running because the file is located in a folder that is not recognized as a trusted location.
Before you start

Ensure that the file containing the macros was created by you or downloaded from a highly reliable source, as enabling macros from unknown locations can expose your device to security risks.

Solution 1Recommended

Add the Containing Folder to Trusted Locations

Configure your Office Trust Center settings to recognize a specific folder as safe, allowing any macro-enabled files within it to run without being blocked.

By default, Office imposes strict security measures on macros to prevent malicious scripts from executing. Instead of lowering your global security settings, the safest method is to create a Trusted Location for your safe files.

1
Open Office Options

Launch your Office application (such as Excel). Click on the File tab in the top-left corner, then select Options at the bottom of the left-hand menu.

2
Access Trust Center Settings

In the Options dialog box, select Trust Center from the left pane, then click the Trust Center Settings button on the right side.

3
Navigate to Trusted Locations

In the Trust Center window, select Trusted Locations from the left sidebar to view your currently trusted folders.

4
Add a New Location

Click the Add new location button at the bottom. Click Browse to locate the folder where your macro-enabled file is stored, select it, and click OK.

5
Move and Run Your File

If your file is not already in the folder you just added, move the macro-enabled file to that specific folder. You should now be able to open the file and run macros without encountering the security block.

Add the Containing Folder to Trusted Locations
Security Warning: Never add your entire Downloads folder or system directories to Trusted Locations. Only trust specific, dedicated folders meant for safe macro files.
Free Microsoft Office alternative

Experience Seamless Macro Support with WPS Office

If you frequently struggle with strict Microsoft Office security blocks or complex Trust Center settings, consider switching to WPS Office. It offers a lightweight, highly compatible alternative with robust VBA support, making it easy to manage and run your macros safely.

  1. 1. Download WPS Office: Download and install the free version of WPS Office on your device.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your .xlsm or macro-enabled file.
  3. 3. Enable Macros: Navigate to the Developer tab to easily enable and manage your macros without navigating complex security menus.
Fully compatible with Microsoft Excel (.xlsm) macro-enabled formats.Advanced, easy-to-use VBA editor for seamless macro execution.Lightweight architecture ensuring fast loading times for heavy spreadsheets.Completely free to download with a familiar interface for effortless migration.
QA img-9

Frequently Asked Questions

Why does Excel block my macros by default?

Microsoft Office blocks macros by default as a security precaution. Macros can contain VBA code that runs automatically, which malicious users sometimes exploit to distribute viruses or malware.

Can I enable all macros globally instead of using Trusted Locations?

Yes, you can select 'Enable all macros' in the Macro Settings section of the Trust Center. However, this is strongly discouraged because it leaves your computer vulnerable to potentially dangerous code from unverified files.

What happens if I move my file out of a Trusted Location?

If you move the macro-enabled file out of the folder you marked as trusted, Office will revert to its default security settings for that file and block the macros from running until it is moved back or the new folder is trusted.

Are network drives supported as Trusted Locations?

Yes, but you must first check the box labeled 'Allow Trusted Locations on my network (not recommended)' in the Trusted Locations menu before you can add a network path.