Fix a Microsoft Office Macro That Stopped Working After a Windows 10 Upgrade
Question details
Determine why an Office macro stopped working after a computer was upgraded from Windows 7 to Windows 10.

- Product
- Microsoft Office VBA macros
- Device & OS
- Windows 10, upgraded from Windows 7
- Scenario
- A user needs to run a macro that worked before the operating system upgrade and still works for other employees.
- Observed behavior
- The macro no longer works on the upgraded computer.
Confirm that the file comes from a trusted source and note any error message or security warning. Compare the Office version and 32-bit or 64-bit edition on the affected computer with a computer where the macro works.
Check Office macro security and trusted locations
Use this solution if the macro is blocked or does not start after the upgrade.
In the Office application that opens the file, select File > Options > Trust Center > Trust Center Settings > Macro Settings. Check whether the current policy disables macros or displays a notification.
Close and reopen the file. If a security warning appears, select Enable Content only after verifying that the file and its macros are trustworthy.
In Trust Center Settings, select Trusted Locations and check whether the file is stored in an approved location. If appropriate and permitted by your organization, add a trusted folder and move the file there.
If the file came from a download or email, close it, right-click it in File Explorer, and select Properties. If an Unblock option appears, select it only after verifying the file is safe, then select Apply.

Repair missing VBA references
Use this solution if the macro starts but reports a compile error or a missing library.
Check Office bitness and Windows-specific dependencies
Use this solution if security settings and references are correct but the macro still fails.
Work with Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office files during a move between applications. It does not repair Microsoft Office macro settings; VBA support and macro compatibility can vary by version and platform.

Frequently Asked Questions
Does upgrading to Windows 10 automatically disable Office macros?
Not necessarily. Office security settings, file blocking, trusted locations, or organization policies may have changed. Check File > Options > Trust Center > Trust Center Settings > Macro Settings and look for a warning when opening the file.
Why does the macro work for other employees but not on my computer?
The computers may differ in Office bitness, trusted locations, installed libraries, network access, or security policies. Compare File > Account > About and the VBA editor's Tools > References on both computers.
How can I tell whether a VBA reference is missing?
Press Alt+F11 in the Office application, then select Tools > References. A missing reference is typically labeled MISSING. Record its name and ask IT to help restore the required library.
Can 64-bit Office cause an older macro to fail?
Yes. VBA code that calls Windows APIs may need updated declarations for 64-bit Office. Check File > Account > About for Office bitness and have a VBA developer review any Declare statements.
Should I enable all macros to make the file work?
No. Enable content only for a verified file, or use an approved trusted location if your organization permits it. If security settings are managed, contact your IT administrator.




