Fix the SOLVER.XLAM!MainEx Error in the Excel Solver Add-In
Question details
Resolve the Solver add-in macro error that appears when opening Excel’s Data tab.

- Product
- Microsoft Excel Solver Add-in
- Device & OS
- not provided
- Scenario
- The user opens the Data tab in Excel with the Solver add-in installed.
- Observed behavior
- Excel reports that it cannot run the macro SOLVER.XLAM!MainEx, even though macros are enabled and Office has been reinstalled.
Confirm that Solver Add-in is listed under File > Options > Add-ins, and note whether the error appears as soon as you open the Data tab. The menu paths below apply to desktop Excel for Windows; available security settings can vary by version or organization.
Re-enable Solver and review ActiveX settings
Use this first to refresh Solver’s add-in registration and check whether an ActiveX setting is blocking it.
In Excel, select File > Options > Add-ins. At the bottom, choose Excel Add-ins in the Manage list and select Go.
Clear the Solver Add-in check box, select OK, and close Excel.
Reopen Excel, return to File > Options > Add-ins > Manage: Excel Add-ins > Go, select Solver Add-in, and select OK.
Go to File > Options > Trust Center > Trust Center Settings > ActiveX Settings. If Disable all controls without notification is selected and a prompt option is available, choose a Prompt me option and select OK.
Close and reopen Excel, select the Data tab, and try Data > Solver. If a security prompt appears, review it before allowing content.
Check for conflicts with other add-ins
Use this if re-enabling Solver and reviewing ActiveX settings do not resolve the error.
Work with spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format support for easier migration. It does not repair Excel’s Solver add-in error, and Solver-dependent files may need to remain in Excel.

Frequently Asked Questions
Where can I re-enable the Solver add-in?
In desktop Excel, go to File > Options > Add-ins, select Excel Add-ins in the Manage list, and click Go. Select Solver Add-in and click OK.
Why does the error appear even though macros are enabled?
Enabling macros does not necessarily resolve an add-in registration or security-setting issue. Re-enable Solver and review File > Options > Trust Center > Trust Center Settings > ActiveX Settings.
What if the ActiveX prompt option is unavailable?
ActiveX options depend on your Excel version and organization’s policies. If the setting is missing or locked, contact your administrator rather than trying to bypass the policy.
Can another add-in cause the Solver error?
An add-in conflict is possible. To test, go to File > Options > Add-ins > Manage: COM Add-ins > Go, temporarily disable other COM add-ins, restart Excel, and try Data > Solver.




