VBA & Macro Problems

Fix Excel VBA Macro Fails After Moving from Office 2010 to Microsoft 365

Maira MehtabMaira Mehtab Nov 13, 2026 869 views

Question details

The user needs to restore Excel VBA macros that previously worked with SAP, Citrix, and Office 2010 but now fail after moving to local computers with Microsoft 365 and local SAP access.

Fix Excel VBA Macro Fails After Moving from Office 2010 to Microsoft 365
Product
Microsoft Excel / Microsoft 365
Device & OS
not provided
Scenario
Migrating from Office 2010 with SAP/Citrix workflows to Microsoft 365 on local computers and resuming macro-based SAP tasks.
Observed behavior
Macros that worked in Office 2010 no longer run successfully after the move to Microsoft 365 and local SAP access.
Before you start

Before troubleshooting, identify the exact macro or line that fails and confirm that you can open the Visual Basic Editor in Microsoft 365. If the macro uses SAP or Citrix automation, have administrator rights available to verify or reinstall those components.

Solution 1Recommended

Check macro security settings and trusted locations in Microsoft 365

Use this first when macros are blocked or disabled after moving to Microsoft 365, because stricter default security often prevents older workbooks from running.

Microsoft 365 applies different macro security defaults than Office 2010, so a workbook that ran before can be silently disabled or behave differently. Trusted locations also need to be reconfigured on the new local computers.

1
Open Trust Center macro settings

In Excel, go to File > Options > Trust Center > Trust Center Settings > Macro Settings, and select Disable VBA macros with notification or enable macros for digitally signed macros according to your organization's policy.

2
Add the workbook location as a trusted location

In Trust Center Settings, open Trusted Locations and add the network or local folder where the macro workbook and related templates are stored.

3
Close and reopen the workbook

Save any changes, close Excel, reopen the workbook, and choose Enable Content when the security warning appears.

Security tip: Avoid enabling all macros without notification unless your administrator has approved it for the specific SAP workbook.
Free Microsoft Office alternative

Open and edit Excel macro workbooks without Microsoft 365 licensing costs

If the migration issue is tied to Microsoft 365 macro restrictions or licensing overhead, WPS Office offers a free, lightweight Office alternative that opens Excel workbooks, keeps familiar spreadsheet workflows, and supports common VBA macro editing with Microsoft Excel format compatibility.

Opens and edits .xlsm and .xlsx Excel workbooks with Microsoft Office format compatibility.Familiar ribbon interface and macro-enabled workbook workflow reduce the learning curve after moving from Office 2010.Free to download and lightweight, avoiding Microsoft 365 subscription costs for everyday spreadsheet tasks.Seamless migration from Microsoft Excel with support for common files, formulas, and printing layouts.
QA img-9

Frequently Asked Questions

Why did my Excel VBA macro work in Office 2010 but not in Microsoft 365?

Microsoft 365 has stricter macro security defaults, and object references or SAP/Citrix components from Office 2010 are often missing or mismatched on new local computers. Check File > Options > Trust Center and Tools > References in the Visual Basic Editor.

How do I find a missing VBA reference after moving to Microsoft 365?

Press Alt+F11 to open the Visual Basic Editor, select Tools > References, and look for any item marked MISSING. Clear or update that reference to the equivalent Microsoft 365 library before running the macro.

Can WPS Office run Excel VBA macros that use SAP and Citrix?

WPS Office can open Excel macro-enabled workbooks and supports common VBA scenarios, but enterprise SAP or Citrix automation components are designed for specific Microsoft Office installations and may still require Microsoft 365 for full compatibility. Test the workbook in WPS Office for non-SAP tasks.

What should I check if the macro is enabled but stops on a SAP call?

Run the macro with F8 in the Visual Basic Editor to identify the exact SAP call, then verify that the SAP GUI automation libraries and drivers are installed and match the Microsoft 365 bitness.