none
solver - macro call

    Question

  • Hi,
    I am trying to use an optimization program that would require a macro call from within the solver routine. Here I am trying to make the solver invoke the macro call "calc" everytime the solver tries to solve for the optimal solution. This doesn't work beyond the first run. Even in this single run - solver doesn't try new values.

    Sub solve()
    Worksheets("sheet2").Activate
    SolverReset
    SolverOptions precision:=0.001, stepthru:=True
    SolverOk SetCell:="S7", MaxMinVal:=2, ByChange:="S4Tongue Tied6"
    Worksheets(2).Calculate
    SolverSolve UserFinish:=True, showref:="calc"
    End Sub

    Is there any other way to solve this? The "calc" function is a matrix multiplication (of varying sizes). Hence had to be implemented as a macro.

    Any help is most welcome.

    Thanks.
    Wednesday, December 26, 2007 6:22 PM