P
ppkw
Hello,
I know that there is a lot written about that problem, but I almost
tried everything.
My macro lokks like that:
Sub Macro2()
SolverReset
SolverAdd CellRef:="$P$736", Relation:=2, FormulaText:="$K$736"
SolverAdd CellRef:="$Q$736", Relation:=2, FormulaText:="$I$736"
SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$V$736:$W$736"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
End Sub
I tried with:
solver.Auto_open and with
Application.Run "Solver.xla!Autpen" and with macro:
Sub AutoOpenSolver()
If Not SOLVER.Solver1.AutoOpened Then
SOLVER.Solver2.Autpen
End If
End Sub
Can anybody help me ???
And other question. Is there possibility to make such a macro with for
loop. For example (I know it is bad):
Sub Macro2()
Fok k = 1 to 10
SolverReset
SolverAdd CellRef:="$P$736+k", Relation:=2,
FormulaText:="$K$736+k"
SolverAdd CellRef:="$Q$736+k", Relation:=2,
FormulaText:="$I$736+k"
SolverOk MaxMinVal:=1, ValueOf:="0",
ByChange:="$V$736+k:$W$736+k"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
Next k
End Sub
I know that there is a lot written about that problem, but I almost
tried everything.
My macro lokks like that:
Sub Macro2()
SolverReset
SolverAdd CellRef:="$P$736", Relation:=2, FormulaText:="$K$736"
SolverAdd CellRef:="$Q$736", Relation:=2, FormulaText:="$I$736"
SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$V$736:$W$736"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
End Sub
I tried with:
solver.Auto_open and with
Application.Run "Solver.xla!Autpen" and with macro:
Sub AutoOpenSolver()
If Not SOLVER.Solver1.AutoOpened Then
SOLVER.Solver2.Autpen
End If
End Sub
Can anybody help me ???
And other question. Is there possibility to make such a macro with for
loop. For example (I know it is bad):
Sub Macro2()
Fok k = 1 to 10
SolverReset
SolverAdd CellRef:="$P$736+k", Relation:=2,
FormulaText:="$K$736+k"
SolverAdd CellRef:="$Q$736+k", Relation:=2,
FormulaText:="$I$736+k"
SolverOk MaxMinVal:=1, ValueOf:="0",
ByChange:="$V$736+k:$W$736+k"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
Next k
End Sub