How to Fix Excel 365 VBA Blocked After Upgrading from Excel 2015
Question details
The user is unable to run legacy VBA macros in Microsoft Excel 365 after migrating from Excel 2015 due to restricted macro settings.

- Product
- Microsoft Excel 365
- Device & OS
- not provided
- Scenario
- Upgrading to a newer version of Microsoft Office (Excel 365) and attempting to use existing macro-enabled workbooks.
- Observed behavior
- VBA code that previously worked is now blocked from executing because of newer Microsoft 365 macro security policies, trusted-location settings, or organizational restrictions.
Ensure you completely trust the source of the macro-enabled workbook before modifying any security settings, as running unknown VBA code can pose significant security risks to your system.
Unblock the Macro-Enabled File in Windows Properties
Microsoft 365 automatically blocks macros in files downloaded from the internet or network locations. You can manually unblock individual trusted files directly in Windows.
This is the most common reason legacy files are blocked in modern Excel versions. The 'Mark of the Web' (MOTW) triggers an automatic security block.
Ensure the affected macro-enabled Excel file is fully closed before attempting to change its properties.
Locate the file in Windows File Explorer, right-click on it, and select 'Properties' from the context menu.
On the 'General' tab, look at the bottom for a 'Security' section. Check the box next to 'Unblock', then click 'Apply' and 'OK'. Reopen the file in Excel.

Add the Document Folder to Trusted Locations
If you have multiple legacy macro files, placing them in a designated Trusted Location bypasses the strict macro blocking mechanism without needing to unblock each file.
Adjust Macro Settings in the Trust Center
Ensure that Excel 365 is configured to prompt you for permission rather than silently disabling all macros.
Experience Seamless Compatibility with WPS Office
If Microsoft 365's strict macro security policies or upgrade costs are disrupting your workflow, WPS Office provides an excellent alternative. Enjoy robust spreadsheet capabilities, a familiar user interface, and seamless file migration without heavy subscription fees.
- 1. Download WPS Office: Visit the official WPS website to download and install the free office suite on your computer.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your legacy workbook seamlessly.
- 3. Edit and Save: Make your edits easily with high format retention and save your work without compatibility headaches.

Frequently Asked Questions
Why does Excel 365 block macros that worked fine in Excel 2015?
Microsoft introduced stricter default security policies in newer versions of Office (like Microsoft 365) to protect users from malicious code. Files originating from the internet or network drives are now aggressively blocked by default using a feature called Mark of the Web.
How do I know if a macro is being blocked by Excel 365?
You will typically see a red or yellow security warning ribbon at the top of the spreadsheet stating 'SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted.'
Can I enable macros for all files in Excel 365 permanently?
While you can select 'Enable all macros' in the Trust Center settings, it is highly discouraged. Doing so makes your computer extremely vulnerable to malware embedded in malicious Excel files.
What if my VBA code itself has errors in Excel 365?
Some legacy VBA methods or 32-bit API declarations may need updating for 64-bit Excel 365. For specific code troubleshooting, you can post a reproducible example in programming communities like Stack Overflow using the VBA tag.




