How to Remove Solver Add-in From Excel

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on October 14, 2022

This tutorial demonstrates how to remove the Solver add-in in Excel.


unload solver ribbon


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

  1. In the Ribbon, select File > Options.


vba solver options


  1. Then select Add-ins and, making sure Excel Add-ins is selected in the drop-down list, and select Go…


ActivateSolver ExcelOptions


In the Ribbon, select Developer > Add-ins > Excel Add-ins.


ActivateSolver Ribbon Developer


  1. In the Add-ins dialog box that is shown, make sure that the Solver Add-in is not and click OK.


Fix Solver disable addin


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.

  1. Open the file in which you need to work with Solver.
  2. Press ALT + F11 to go to the VBE Editor.
    In the Ribbon, select Developer > Visual Basic.


vbacompile vbe


  1. Select the VBAProject for the file, and double-click on ThisWorkbook . Then, from the Object drop-down box, select Workbook.


unload solver vba


The Workbook_Open sub-procedure is created.


unload solver workbook open


  1. In the Procedure box on the right-hand side, select BeforeClose.


unload solver workbook close


This adds the Workbook_BeforeClose sub-procedure to your workbook.

  1. 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




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.

  1. Save and close the file.

AI Formula Generator

Try for Free

See all How-To Articles