Solver automatically in the VBA Reference

G

Guest

I have to automatically (when someones open the Excel)
activate the Solver Box in the VBA reference. Is that
possible, does anybody knows how to do that?



Thanks

Velero
 
D

David Adamson

Adapt this

Sub Run_Solver()

On Error Resume Next
With Application.AddIns("Solver Add-In")
..Installed = True
ThisWorkbook.VBProject.References.AddFromFile Filename:=.FullName
End With

'MsgBox "attempting to use solver. May require a double check"

For x = 1 To 7

Stage = "Stage" & x

With Worksheets(Stage)
..Activate
solverOk '
SolverSolve userFinish:=True
SolverFinish keepFinal:=1
'
End With
Next x

Exit sub
 
Top