How to Add a Missing Solver Reference to an Excel VBA Project
Question details
The user needs to add the Solver reference (Solver.xlam) manually in the Excel Visual Basic Editor because it is missing from the default references list.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Writing or running VBA macros that require the Excel Solver add-in functions.
- Observed behavior
- Solver is enabled in Excel, but it does not appear in the Tools > References list within the Visual Basic Editor, causing VBA macro compilation errors.
Ensure that the Solver add-in is actually enabled in the main Excel application before attempting to add its reference in the Visual Basic Editor.
Manually Browse and Add Solver.xlam in VBA References
Locate the Solver.xlam file on your hard drive and manually add it to the VBA references.
If the Solver add-in is enabled in Excel but missing from the Visual Basic Editor, the fastest fix is to manually browse to the Microsoft Office Library folder and select the Solver.xlam file.
Press Alt + F11 on your keyboard to open the Visual Basic Editor in Excel.
Click on 'Tools' in the top menu bar, then select 'References' from the dropdown list.
In the References dialog box, click the 'Browse...' button.
Navigate to the Microsoft Office Library SOLVER folder. The path is typically 'C:\Program Files\Microsoft Office\root\Office16\Library\SOLVER' or '\Program Files\Microsoft Office\Office14\Library\SOLVER', depending on your Office version.
Select the 'Solver.xlam' file, click 'Open', and then ensure the box next to 'Solver' is checked in your References list before clicking 'OK'.

Enable the Solver Add-in in Excel Options
The VBA reference might be missing because the base Solver add-in hasn't been properly loaded in the Excel interface yet.
Try WPS Office for Seamless Spreadsheet Management
Experiencing frustrating missing library paths or VBA reference errors in Microsoft Excel? WPS Office provides a free, lightweight, and highly compatible alternative with powerful built-in spreadsheet features, a familiar interface, and broad format support.
- 1. Download WPS Office: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the lightweight installer and follow the on-screen prompts to set up the software.
- 3. Open Your Excel Files: Launch WPS Spreadsheets and open your existing .xlsx files directly with full formatting retained.

Frequently Asked Questions
Where is the default folder for Solver.xlam in Windows?
The Solver.xlam file is typically located in the Microsoft Office installation directory. Common paths include 'C:\Program Files\Microsoft Office\root\Office16\Library\SOLVER' for newer versions, or 'C:\Program Files (x86)\Microsoft Office\Office14\Library\SOLVER' for older 32-bit versions.
Why does Solver disappear from VBA references after an update?
Office updates can sometimes reset add-in configurations, change installation folder paths, or temporarily disable certain libraries. This requires you to re-enable the add-in in Excel options or browse for the reference manually in the VBA Editor.
Can I run Solver macros if the reference says 'MISSING'?
No. If the reference is marked as 'MISSING' in the VBA Editor, the compiler cannot find the Solver functions. Attempting to run the macro will trigger a compilation error until you remove the broken reference and link the correct file path.




