SolverGet Function Example

This example displays a message if you haven’t used Solver on Sheet1.

Worksheets("Sheet1").Activate
state = SolverGet(typeNum:=1)
If IsError(state) Then
    MsgBox "You have not used Solver on the active sheet"
End If