Macros Blocked on Excel

Problem

  • Problem: Macros from the internet will be blocked by default in Office
  • Error Message: "SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted.
  • Symptoms: Can't open macros in Excel
  • Reason: VBA macros are a common way for malicious actors to gain access to deploy malware and ransomware. Therefore, to help improve security in Office, we’re changing the default behavior of Office applications to block macros in files from the internet. For more information please visit Microsoft's article
  • Key Words: VBA, Macros, Excel, Security Risk, Blocked, Office, Microsoft

Environment

  • Microsoft Excel
  • Windows devices only (MacOS is not affected)

Workaround

The following table list different common scenarios and possible approaches to take to unblock VBA macros and allow them to run. You don't have to do all possible approaches for a given scenario. In the cases where we have listed multiple approaches, pick the one that best suits your organization.

Scenario Possible approaches to take  
Individual files • Select the Unblock checkbox on the General tab of the Properties dialog for the file
• Use the Unblock-File cmdlet in PowerShell

For more information, see Remove Mark of the Web from a file.
 
Files centrally located on a network share or trusted website Unblock the file using an approach listed under "Individual files."

If there isn't an Unblock checkbox and you want to trust all files in that network location:
• Designate the location as a Trusted site
• Add the location to the Local intranet zone

For more information, see Files centrally located on a network share or trusted website.
 
Files stored on OneDrive or SharePoint, including a site used by a Teams channel • Have users directly open the file by using the Open in Desktop App option
• If users download the file locally before opening it, remove Mark of the Web from the local copy of the file (see the approaches under "Individual files")
• Designate the location as a Trusted site

For more information, see Files on OneDrive or SharePoint.
 
Macro-enabled template files for Word, PowerPoint, and Excel If the template file is stored on the user's device:
• Remove Mark of the Web from the template file (see the approaches under "Individual files")
• Save the template file to a Trusted Location

If the template file is stored on a network location:
• Use a digital signature and trust the publisher
• Trust the template file (see the approaches under "Files centrally located on a network share or trusted website")

For more information, see Macro-enabled template files for Word, PowerPoint, and Excel.
 
Macro-enabled add-in files for PowerPoint • Remove Mark of the Web from the Add-in file
• Use a digital signature and trust the publisher
• Save the Add-in file to a Trusted Location

For more information, see Macro-enabled add-in files for PowerPoint and Excel.
 
Macro-enabled add-in files for Excel • Remove Mark of the Web from the Add-in file
• Save the Add-in file to a Trusted Location

For more information, see Macro-enabled add-in files for PowerPoint and Excel.
 
Macros that are signed by a trusted publisher • [recommended] Deploy the public code-signing certificate for the trusted publisher to your users and prevent your users from adding trusted publishers themselves.
• Remove Mark of the Web from the file, and have the user add the publisher of the macro as a trusted publisher.

For more information, see Macros that are signed by a trusted publisher
.
Groups of files saved to folders on the user’s device Designate the folder a Trusted Location

For more information, see Trusted Locations.

Contact Us

If you still need help, call us at (208) 496-9009 or start a Live Chat with us.

Hours of Operation: Mon - Fri 7:30 AM - 8:00 PM, Sat 10:00 AM - 4:00 PM Mountain Time

(excluding weekly devotional, forum hour and University Recognized holidays)

Details

Article ID: 11587
Created
Mon 9/26/22 10:13 AM
Modified
Tue 12/12/23 12:07 PM