Hi,
I hope I managed to upload the excel file now. Otherwise you can find parts of my code here.
When I debug, the highlighted line is the following: Sheets("Start").Cells(i, 9) = Sheets("Solver").Cells(4, 2). So this is the line, just behind executing the solver model.
Call Solvermacro
Worksheets("Start").Activate
'Solver output
Sheets("Start").Cells(i, 9) = Sheets("Solver").Cells(4, 2)
Sheets("Start").Cells(i, 10) = Sheets("Solver").Cells(4, 3)
Next i
End sub
This is full code of my solver module:
Sub Solvermacro()
Worksheets("Solver").Activate
SolverReset
SolverOk SetCell:="$C$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$B$4:$C$4,$C$6" _
, Engine:=2, EngineDesc:="Simplex LP"
SolverOk SetCell:="$C$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$B$4:$C$4,$C$6" _
, Engine:=2, EngineDesc:="Simplex LP"
SolverSolve UserFinish:=False
End Sub
Best regards,
Lisa
Bookmarks