Description
Loads parameters for an existing Solver model that have been saved to the worksheet.
Before you use this function, you must establish a reference to the Solver add-in. With a Visual Basic module active, click References on the Tools menu, and then select the Solver.xla check box in the Available References box. If Solver.xla doesn't appear in the Available References box, click Browse, click Solver in the \Excel\Library\Solver folder, and then click OK.
Syntax
SolverLoad(loadArea)
loadArea
Required. A reference on the active worksheet to a range of cells from which you want to load a complete problem specification. The first cell in the loadArea contains a formula for the Set Target Cell box in the Solver Parameters dialog box; the second cell contains a formula for the By Changing Cells box; subsequent cells contain constraints in the form of logical formulas. The last cell optionally contains an array of Solver option values. For more information, see SolverOptions. The range represented by the argument loadArea can be on any worksheet, but you must specify the worksheet if it's not the active sheet. For example, SolverLoad("Sheet2!A1:A3") loads a model from Sheet2 even if it's not the active sheet.
See Also
SolverOk Function, SolverSave Function.
Example
This example loads the previously calculated Solver model stored on Sheet1, changes one of the constraints, and then solves the model again.
Worksheets("Sheet1").Activate SolverLoad loadArea:=Range("A33:A38") SolverChange cellRef:=Range("F4:F6"), _ relation:=1, _ formulaText:=200 SolverSolve userFinish:=False