T
Tbeek
I what a piece of VBA code that will add a reference to solver.
I would put it in a sub or function that uses solver
Thank
I would put it in a sub or function that uses solver
Thank
Dana DeLouis said:Sub SolverInstall()
On Error Resume Next
Dim wb As Workbook
Dim SolverPath As String
' Set a Reference to the workbook that will hold Solver
Set wb = ActiveWorkbook
SolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLA"
With AddIns("Solver Add-In")
.Installed = False
.Installed = True
End With
'Solver itself has 'focus' at this point.
'Make sure you point to the correct Workbook for Solver
wb.VBProject.References.AddFromFile SolverPath
End Sub
HTH. :>)