VBA & Macro Problems

Fix the SOLVER.XLAM!MainEx Error in the Excel Solver Add-In

Jason MillerJason Miller Nov 20, 2026 868 views

Question details

Resolve the Solver add-in macro error that appears when opening Excel’s Data tab.

Fix the SOLVER.XLAM!MainEx Error in the Excel Solver Add-In
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Excel add-ins

In Excel, select File > Options > Add-ins. At the bottom, choose Excel Add-ins in the Manage list and select Go.

2
Disable Solver

Clear the Solver Add-in check box, select OK, and close Excel.

3
Re-enable Solver

Reopen Excel, return to File > Options > Add-ins > Manage: Excel Add-ins > Go, select Solver Add-in, and select OK.

4
Review ActiveX settings

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.

5
Restart and test

Close and reopen Excel, select the Data tab, and try Data > Solver. If a security prompt appears, review it before allowing content.

Security settings may be restricted: ActiveX options vary by Excel version and may be controlled by your organization. Do not enable all controls just to test Solver; ask your administrator if the relevant setting is unavailable.
Free Microsoft Office alternative

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.

Open and edit Microsoft Excel XLSX and XLS files.Use spreadsheet formulas and charts for everyday data analysis.Navigate a familiar, easy-to-use office interface.Move between common Microsoft Office document formats more easily.
microsoft office alternative - wps office

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.