SolverFinish Function in Excel 2007 development

06/11/2009

Tells Microsoft Office Excel what to do with the results and what kind of report to create when the solution process is completed.

Before you use this function, you must establish a reference to the Solver add-in. In the Visual Basic Editor, with a module active, click References on the Tools menu, and then select the Solver.xlam check box under Available References. If Solver.xlam does not appear under Available References, click Browse and open Solver.xlam in the \office12\library\Solver subfolder.

SolverFinish( KeepFinal , ReportArray )

ReportArray    Optional Variant. The kind of report that Excel will create when Solver is finished: 1 creates an answer report, 2 creates a sensitivity report, and 3 creates a limit report. Use the Array function to specify the reports you want to display — for example, ReportArray:= Array(1,3).

Example

This example loads the previously calculated Solver model stored on Sheet1, solves the model again, and then generates an answer report on a new worksheet.

 Worksheets("Sheet1").Activate
SolverLoad LoadArea:=Range("A33:A38")
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1, ReportArray:=Array(1) 
Posted in: Office Development| Tags: Office Excel 2007 Function Development excel solver click references solverfinish reportarray available xlam

Excel 2007 Developer Reference

06/11/2009

This reference contains conceptual overviews, programming tasks, samples, and reference documentation for developing solutions that are based on Microsoft Office Excel 2007.

Publish date of this reference: April 2009 (version 2007)

This documentation can be accessed from the following locations:

  • From the product (most recent version):  If you are connected to the Internet, you can view the most recent version of this reference in Excel. Click Help, and in the Search box, under Content from Office Online, click Developer Reference.
  • From the product (installed version):   If you are not connected to the Internet, you can still view the version of this reference that was included with your product. Click Help, and in the Search box, under Content from this computer, click Developer Reference. October 2006 (version 2007) is included with the product.
  • From the MSDN Library.  To view the April 2009 version of this reference in the MSDN Library, click the items in the MSDN table of contents that is displayed in the navigation pane of your browser.
Posted in: Office Development| Tags: Office Excel 2007 Reference Programming Microsoft Developer version excel date documentation publish

Hot Posts

Latest posts

Tags

Others

Sponsors