contents.gifprev0.gifnext1.gif

Controlling the Solver's Operation

You can control every aspect of the Solver's operation programmatically. You can display or completely hide the Solver dialog boxes, create or modify the choices of objective (target cell), variables (changing cells) and constraints, check whether an optimal solution was found and produce reports. You do this by calling a set of Solver-specific functions from a program you write in LotusScript for 1-2-3 97 Edition.

Controlling the Solver can be as simple as adding one line to your LotusScript code! Each worksheet in a workbook may have a Solver problem defined, which is saved automatically with the workbook. You can create this Solver model interactively if you wish. If you distribute such a workbook, with a worksheet containing a Solver model and a LotusScript program, all you need to do in your code is activate the worksheet and call the function SolverSolve.

Note: In order to use any of the Solver-specific functions, you must include a LotusScript Use statement referencing the Solver add-in in your Global Declarations section. For example:

Use "c:\lotus\123\solver\solver.12a"