Fix Excel VBA Macro Fails After Moving from Office 2010 to Microsoft 365
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.

- 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 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.
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.
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.
In Trust Center Settings, open Trusted Locations and add the network or local folder where the macro workbook and related templates are stored.
Save any changes, close Excel, reopen the workbook, and choose Enable Content when the security warning appears.
Resolve missing VBA references and SAP/Citrix automation components
Use this when the macro is enabled but still stops on an error, especially after moving from Office 2010 to Microsoft 365 with local SAP access.
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.

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.




