I have to maintain both an Excel 2003 and an Excel 2010 version of the same code, but the part that calls the solver seems to be not working in 2010 version. In the 2003 version I have:
where funcPrice() is a function that takes one argument. In Excel 2003 this works perfectly. However in 2010 the solver fails, and as I can see on the status bar close to the bottom of the screen the objective cell is always zero, hence the failure.![]()
' Fill price formula temporarily Worksheets("InstrumentsList").Range("A1").Offset(rowNum - 1, 43) = "= funcPrice(AS" & (rowNum) & ")" ' Solver SolverReset SolverOk SetCell:="AR" & rowNum, MaxMinVal:=3, ValueOf:=mktPrice, ByChange:="AS" & rowNum Dim solverResults As Integer solverResults = SolverSolve(UserFinish:=True, ShowRef:="SolverIteration")
Has anyone encountered similar issue? Is the syntax for calling the solver different in Excel 2010? Thanks!
Bookmarks