View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Adamson[_3_] David Adamson[_3_] is offline
external usenet poster
 
Posts: 40
Default Solver automatically in the VBA Reference

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



wrote in message
...
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