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. :)
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =
"Tbeek " wrote in message
...
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
Thanks
---
Message posted from http://www.ExcelForum.com/