How to Remove Solver Add-in From Excel
Written by
Reviewed by
This tutorial demonstrates how to remove the Solver add-in in Excel.
Solver is an add-in that is provided with Excel and is used to perform “what-if” analysis by providing alternative answers to a formula in a cell based on values you may pass to the formula from other cells in your workbook. To use Solver, you need to enable the add-in. Once you have enabled the add-in, every time Excel is then opened, the add-in is automatically loaded. You may find you do not wish this to happen, as it does take up memory you may need. This tutorial shows how to remove the add-in from Excel.
Note: If the Developer tab is not visible in the Ribbon, you’ll need to enable it before proceeding.
Remove Solver Add-in
- In the Ribbon, select File > Options.
- Then select Add-ins and, making sure Excel Add-ins is selected in the drop-down list, and select Go…
OR
In the Ribbon, select Developer > Add-ins > Excel Add-ins.
- In the Add-ins dialog box that is shown, make sure that the Solver Add-in is not and click OK.
The Solver Add-in is now removed from the Data tab in the Ribbon.
Load and Unload Solver With VBA
If you have a file in which you use the Solver add-in, but you do not want the add-in loaded when you work on other files in Excel, you can write some VBA code to load the add-in when the file is opened, and to unload the add-in when the file is closed again.
- Open the file in which you need to work with Solver.
- Press ALT + F11 to go to the VBE Editor.
OR
In the Ribbon, select Developer > Visual Basic.
- Select the VBAProject for the file, and double-click on ThisWorkbook . Then, from the Object drop-down box, select Workbook.
The Workbook_Open sub-procedure is created.
- In the Procedure box on the right-hand side, select BeforeClose.
This adds the Workbook_BeforeClose sub-procedure to your workbook.
- You can then copy and paste the code below into your sub-procedures:
Private Sub Workbook_Open()
Dim Solv As Object
Set Solv = AddIns("Solver Add-In")
If Solv.Installed = False Then
AddIns("Solver Add-in").Installed = True
End If
End Sub
and
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Solv As Object
Set Solv = AddIns("Solver Add-In")
If Solv.Installed = True Then
AddIns("Solver Add-in").Installed = False
End If
End Sub
When the workbook opens, the macro checks to see if Solver is loaded, and if Solver is not loaded, it loads it. Similarly, when the workbook closes, it checks to see if Solver is loaded, and if it is loaded, it unloads it.
- Save and close the file.