Forum Discussion

Werner_Geiger's avatar
Werner_Geiger
Brass Contributor
Sep 25, 2021

SolverSolve Return Values Text?

VBA SolverSolve returns interger values 0 to 20. Does somebody know how I can access (and then display) the associated texts as described in the documentation?

2 Replies

  • Werner_Geiger 

    No, those descriptions are not exposed in VBA. You could create code for it yourself:

        Dim strResult As String
        Select Case Solver.SolverSolve(True)
            Case 1
                strResult = "Solver found a solution. All constraints and optimality conditions are satisfied."
            Case 2
                ...
        End Select
        MsgBox strResult

Resources