Microsoft Excel: Macro Error - "Microsoft has blocked macros from running because the source of this file is untrusted"

Summary

In Excel you receive an error that states "Microsoft has blocked macros from running because the source of this file is untrusted." This guide will walk you through how to fix this.

Body

Issue

In Excel you receive an error that states "Microsoft has blocked macros from running because the source of this file is untrusted." 

Uploaded Image (Thumbnail)

Environment

Microsoft Excel

Resolution

Solution 1:

  1. In Excel, go to File> Options > Trust Center > Trust Center Settings Uploaded Image (Thumbnail)
     
  2. Under "Macro Settings" and "Developer Macro Settings", check the box for "Trust access to the VBA project object model" Uploaded Image (Thumbnail)
     
  3. Next, click OK. You will then need to restart your Excel client and re open your workbook. If this doesn't help, move on to Solution 2 below.


Solution 2: 

  1. Copy the file location of where the file is located. This may be on a Shared Drive, OneDrive or your local storage. In this example, I will use our MIS Drive. Uploaded Image (Thumbnail)
     
  2. With Excel open, click on File > Options > Trust Center > Trust Center Settings... Uploaded Image (Thumbnail)
     
  3. Under "Trusted Locations" you will want to click on "Add new location..." and paste the file path you copied earlier. Uploaded Image (Thumbnail)
     
  4. Additionally, you can choose to change the link to the Root file of the drive so that all files within that location are trusted under your new configuration.
    1. In the example below, I remove the "\Certificates" folder and leave it to only show "Z:\Documentation". 
    2. Make sure you click the check box that says "Subfolders of this location are also trusted". Uploaded Image (Thumbnail)
  5. Once done, click OK, close Excel and re-load your workbook. You should notice that the error is now gone and your macros should work as they would normally. 

Done!

Cause

Unknown

Details

Details

Article ID: 13212
Created
Tue 6/11/24 4:23 PM
Modified
Tue 6/11/24 4:43 PM