Equivalent to choosing Range Analyze Solver..., pressing the Variables button, and then pressing the Add button in the Solver Parameters dialog box. Adds a set of decision variable cells to the current problem.
Syntax
SolverAdd(CellRef, 0, 0)
CellRef is a reference to a cell or a range of cells on the active worksheet and forms a set of decision variables.
Remarks
The SolverAdd, SolverChange and SolverDelete functions correspond to the Add, Change, and Delete buttons in the Solver Parameters dialog box. In this form, you can use these functions to add or change sets of decision variables. For many macro applications, however, you may find it more convenient to load the problem in a single step using the SolverLoad function.
Note that SolverOk defines the first entry in the By Changing Variable Cells list box. Use SolverAdd to define additional entries in the Variables Cells list box. Do not call SolverOk with a different ByChange argument after you have defined more than one set of variable cells.