Hi,
Since VBA doesn't know what SolverReset is - so I tried to tell it by clicking Tools, References and choosing Solver in the list but I can't find it from the list. I am using office XP2000, is there any alternative name for Solver?
And I also tried to add a line of code without setting a reference but it still doesn't work.
Sub Eff0()
'to return an efficient portfolio for given target return
SolverReset = Application.Run "Solver.xla!SolverReset"
Call SolverAdd(Range("portret1"), 2, Range("target1"))
Call SolverOk(Range("portsd1"), 2, 0, Range("change1"))
Call SolverSolve(True)
SolverFinish
End Sub
Could you tell me what mistake I made?
Since VBA doesn't know what SolverReset is - so I tried to tell it by clicking Tools, References and choosing Solver in the list but I can't find it from the list. I am using office XP2000, is there any alternative name for Solver?
And I also tried to add a line of code without setting a reference but it still doesn't work.
Sub Eff0()
'to return an efficient portfolio for given target return
SolverReset = Application.Run "Solver.xla!SolverReset"
Call SolverAdd(Range("portret1"), 2, Range("target1"))
Call SolverOk(Range("portsd1"), 2, 0, Range("change1"))
Call SolverSolve(True)
SolverFinish
End Sub
Could you tell me what mistake I made?