How to Add and Manage Trusted Locations for Macros in Microsoft Excel

When working with macro-enabled workbooks (.xlsm, .xlsb, or .xlam) in Microsoft Excel, security restrictions frequently block Visual Basic for Applications (VBA) code from executing. Microsoft 365 and Excel for Windows implement stringent defensive mechanisms, such as Mark of the Web (MotW) inspection and Protected View, which display red banner warnings stating: “Microsoft has blocked macros from running because the source of this file is untrusted.”

While disabling macro security globally exposes your computer to severe malware risks, configuring dedicated Trusted Locations establishes an authenticated directory perimeter. Any workbook stored within a Trusted Location bypasses Protected View and macro validation hurdles automatically, enabling seamless automation for your trusted internal spreadsheets. This tutorial explains how to add, manage, and secure Trusted Locations in Microsoft Excel.

Understanding Trusted Locations in Microsoft Excel

A Trusted Location is a local folder or authenticated network directory designated as safe within Excel’s Trust Centre architecture. When you open a workbook residing inside an active Trusted Location:

  • Excel skips the Mark of the Web validation check.
  • Protected View is suppressed, allowing instant file editing.
  • Embedded VBA macros, ActiveX controls, and data connections run immediately without prompting confirmation banners.
  • Documents originating from outside locations (such as email attachments or browser downloads) can simply be moved into this directory to grant execution clearance.

Security Warning: Never designate universal directories—such as your entire C:\ drive, the Downloads folder, or temporary caches—as Trusted Locations. Doing so allows malicious macro payloads downloaded from the internet to execute unhindered. Always create an isolated, dedicated directory for your verified business spreadsheets (e.g., C:\ExcelMacros\Production).

Step 1: Open the Excel Trust Centre

  1. Launch Microsoft Excel on your Windows PC.
  2. Click File in the top-left ribbon corner, then select Options at the bottom of the left sidebar.
  3. In the Excel Options dialogue, click Trust Centre in the navigation list.
  4. Click the Trust Centre Settings… button located on the right side of the window.

Step 2: Add a Local Folder as a Trusted Location

  1. In the Trust Centre sidebar, click Trusted Locations. Excel displays a list of pre-configured system locations (such as the default startup and add-in directories).
  2. Click the Add new location… button near the bottom of the dialogue.
  3. In the Microsoft Office Trusted Location window, click Browse….
  4. Navigate to and select the specific local folder where your trusted macro spreadsheets are stored (e.g., C:\Users\Username\Documents\TrustedSpreadsheets), then click OK.
  5. Subfolders Toggle: If your folder structure contains categorised sub-directories, check the box labelled Subfolders of this location are also trusted.
  6. Description: Type a helpful reference note in the Description field (e.g., “Approved corporate finance automation macros”).
  7. Click OK to confirm.

The selected path now appears in your active Trusted Locations list, and any workbook opened from this directory will execute macros automatically.

Step 3: Allow Trusted Locations on Your Network (Optional)

By default, Excel restricts Trusted Locations exclusively to local disk drives, actively preventing network paths (such as shared server folders or UNC paths like \\fileserver\finance\macros) from executing macros. If your organisation stores shared macro workbooks on an internal intranet file share:

  1. Open the Trusted Locations panel inside the Trust Centre.
  2. At the bottom of the screen, check the box labelled Allow Trusted Locations on my network (not recommended).
  3. Click Add new location… and enter the full Universal Naming Convention (UNC) path to the internal server folder (e.g., \\corp-server\departments\accounting\templates).
  4. Click OK to save the path.

Note: Mapped network drives (such as Z:\) should be added using their full UNC path rather than their assigned drive letter to ensure consistent resolution across Windows sessions.

Step 4: Modify or Remove Existing Trusted Locations

Periodically reviewing your trusted directories ensures obsolete paths are retired:

  1. Navigate back to File > Options > Trust Centre > Trust Centre Settings > Trusted Locations.
  2. Select the location you wish to alter from the list.
  3. Click Modify… to change subfolder trust permissions or browse to an updated path.
  4. Click Remove to revoke trust immediately. Workbooks located in a removed directory will immediately revert to standard macro security restrictions.

Disabling All Trusted Locations for High-Security Audits

If you are investigating suspected security breaches or preparing a workstation for restricted compliance audits, you can suspend all Trusted Location exemptions without deleting individual directory entries:

  1. Open the Trusted Locations window in the Trust Centre.
  2. Check the box labelled Disable all Trusted Locations.
  3. Click OK twice to apply the change.

When this setting is enabled, Excel ignores all listed trusted paths, enforcing rigorous macro warnings and Protected View across every single workbook opened on the device.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.