829
Welcome to the @RISK 6.0 Automation Library. Using this library you can automate the features of @RISK for Excel. Please Note: While Palisade Corporation will make every effort to maintain compatibility with the information presented here, we can not guarantee that we will do so in future releases of @RISK. © Palisade Corporation. All Rights Reserved. Introduction Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

RISK Object Library - Palisade Corporation

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: RISK Object Library - Palisade Corporation

Welcome to the @RISK 6.0 Automation Library. Using this library you can automate the features of @RISK for Excel.

Please Note: While Palisade Corporation will make every effort to maintain compatibility with the information presented here, we can not guarantee that we will do so in future releases of

@RISK.

© Palisade Corporation. All Rights Reserved.

Introduction

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 2: RISK Object Library - Palisade Corporation

Description

Palisade @RISK 6.0 for Excel Object Library

Object Model

Project Overview

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 3: RISK Object Library - Palisade Corporation

Forms

Form Description

CellFormattingDialog

Classes

Class Module Description

Risk The root @RISK application object.

RiskAdvSensAnalysis Defines an advanced sensitivity analysis

RiskAdvSensInput Defines an input for an advanced sensitivity analysis.

RiskAdvSensInputCollection A collection of RiskAdvSensInput Objects.

RiskApplicationSettings Contains a collection of properties that control general application settings.

RiskConstants A collection of @RISK constants.

RiskFitDefinition The definition of a fit which exists in a currently open Excel workbook.

RiskFitDefinitionCollection A collection of all RiskFitDefinitions associated with all open Excel workbooks.

RiskFitInput Contains summary information about the input data of a fit.

RiskFitParameter Contains information about a fitted distribution parameter.

RiskFitParameterCollection A collection of RiskFitParameter Objects, describing the parameters of a fitted distribution.

RiskFitResult The results of a single distribution fitting operation.

Page 4: RISK Object Library - Palisade Corporation

RiskFitResultCollection A collection of RISKFitResult objects, produced by performing a distribution fitting operation.

RiskFitTestStatistic Contains information about a fit test statisic.

RiskGoalSeekAnalysis Defines a goal seek analysis.

RiskModel An object where @RISK modeling dialogs can be displayed, functions swapped, etc.

RiskProject An object for the control of the @RISK for Project features of the application.

RiskSimResultCollection An object which allows access to the results of the most recently run @RISK simulation.

RiskSimulatedResult Contains simulation results for an @RISK input or output.

RiskSimulation An object where @RISK simulations can be setup, started, and results analyzed.

RiskSimulationSettings An object where the @RISK simulation settings are maintained.

RiskStressAnalysis Defines a stress analysis.

RiskStressInput Defines an input for a stress analysis.

RiskStressInputCollection A collection of RiskStressInput Objects.

Public Enumerations

Enumeration Description

RiskAdvSensVariationMethod An enumeration of possible advanced sensitivity variation methods.

RiskAutomaticResultsDisplay An enumeration of the possible automatic results (if any) that can be automatically displayed when a @RISK simulation

is run.

RiskBatchFitReportStyle

RiskCellFormattingStyle An enumeration of different ways @RISK can automatically format spreadsheet cells containing @RISK inputs or outputs.

RiskCollectDistributionSamples An enumerated list of possible ways distribution samples can be collected.

RiskDistributionDisplayFormat An enumeration of distribution graph display formats.

Page 5: RISK Object Library - Palisade Corporation

RiskDistributionSecondaryAxisOverlay An enumerated list of secondary y-axis overlays.

RiskDistributionTruncation An enumeration of possible truncation parameters.

RiskEdition An enumerated list of @RISK product editions.

RiskFitChiSqBinArrangement An enumeration of bin arrangments that can be used for the chi-squared goodness-of-fit test.

RiskFitDataType An enumeration of the possible types of input data for a fitting operation.

RiskFitFilterType An enumeration of the possible fit filters that can be applied.

RiskFitLimitType An enumeration of possible limits (or boundary conditions) that can be applied to an extremum of a distribution.

RiskFitMethod An enumeration which specified possible methods of fitting distribution to data.

RiskFitStatistic An enumeration of fitting statistics.

RiskFixedParameter An enumeration of parameters that can be fixed for fitting operations.

RiskGanttLocation

RiskGoalSeekComparisonMethod An enumeration of goal seek comparison methods.

RiskGraphLegendView

RiskInterfaceMode An enumerated list of possible operational states of the @RISK application.

RiskLanguageID An enumerated list of the possible languages @RISK can be using.

RiskLibraryAvailability An enumeration of the possible states of availability of the @RISK Library.

RiskOptimizationMode

RiskOptimizerEngine An enumeration of optimization engines that can be used in RISKOptimizer.

RiskOptimizerTimeSpanUnit An enumeration of time-span values used to control how long an optimization can run.

RiskProductType An enumeration of @RISK product types.

RiskProjectCalculationMode

RiskProjectSimulationDateRange

Page 6: RISK Object Library - Palisade Corporation

RiskRandomNumberGenerator An enumerated list of random number generators available for use in @RISK.

RiskRegressionCoefficientFormat An enumeration of possible regression coefficient formats.

RiskReportPlacement An enumeration of possible destination workbooks for a report.

RiskReportSelection An enumeration of Excel reports.

RiskResultsGraphType An enumeration of different graph types for use in the RiskResultsGraph function.

RiskResultsStorageLocation An enumeration of possible choices where and how @RISK can stored simulation results.

RiskSamplingType An enumeration of sampling types that can be used during a simulation.

RiskScalingFactor An enumerated list of named scaling factors.

RiskSensAnalysisInputType An enumeration of possible sensitivity analysis input types.

RiskSimulationCompletionStatus An enumerated list of possible results from a simulation.

RiskStandardRecalcBehavior An enumerated list of ways @RISK distribution functions will return values when a simulation is not in progress.

RiskStaticValueType An enumeration of possible static values to be used when an RiskStaticValue is not specified for a function.

RiskStatisticFunctionUpdating An enumeration of possible updating mode for statistic functions.

RiskStatisticType An enumeration of statistic types.

RiskStressMethod An enumeration of stress methods for an input.

RiskSummaryGraphCenterlineStatistic An enumerated list of different summary graph center line statistics.

RiskSummaryGraphRange An enumerated list of possible summary graph ranges.

RiskSwapPreviewChanges An enumeration of possible ways the change preview dialog will be displayed when the @RISK user swaps in functions.

RiskTextOrientation An enumeration of possible text orientations.

RiskTimeSeriesOrientation

RiskTimeSeriesOutputType

RiskTornadoDisplayFormat An enumeration of tornado graph display formats.

Page 7: RISK Object Library - Palisade Corporation

RiskWindowListDisplay An enumeration of values controling how the @RISK Windows List will be displayed.

RiskWindowSize An enumeration of default window sizes.

Public UDTs

UDT Description

RiskChiSqBinInformation

RiskPredefinedFit

RiskScenarioData

RiskSensitivityData

RiskStatisticSensitivityData

© Palisade Corporation. All Rights Reserved.

Page 8: RISK Object Library - Palisade Corporation

NOTE: You must have the Professional or Industrial Edition of @RISK 6.0 to be able to run any automation code. The Standard Edition of @RISK does not support automation.

Making the Appropriate References From VBA

To automate @RISK 6.0 from VBA, you must first make two references. From within the VBA Editor window, make sure your VBA project is active, and then select the Tools / References

menu item. In the References dialog, choose the two items labeled “RiskXLA” and "Palisade @RISK 6.0 for Excel Object Library". The image below shows the references that must be

made.

The first of these references, RiskXLA, is the main @RISK add-in file (Risk.xla on disk). This reference serves three functions. First, it gives you access to the root “Risk” object from which

all automation calls to @RISK begin. Second, it provides all the constants used in @RISK Automation. Finally, it ensures that @RISK will automatically be loaded when the workbook

containing the reference is opened. (In some cases, this last feature may not be desired. It is possible to load @RISK on demand instead of automatically, which is described later in this

document.)

The second reference is the @RISK 6.0 object library, which gives you access to all the objects and types needed to control @RISK. Once you make this reference, you will have access to

Getting Started

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 9: RISK Object Library - Palisade Corporation

the entire @RISK object model via the root "Risk" object. For example, you can now run an @RISK simulation of 150 iterations and display the mean of the output named "Profit" with the

following VBA code:

Visual Basic

Public Sub RunMySimulation

Risk.Simulation.Settings.NumIterations = 150

Risk.Simulation.Start

MsgBox Risk.Simulation.Results.GetSimulatedOuput("Profit").Mean

End Sub

Example Code

Examing the @RISK example file "@RISK Developer Kit - @RISK Automation Macro" is an excellent way to get started using the @RISK Developer Kit. In @RISK, go to the Help Menu and

choose the Example Spreadsheets command. The file is located in the "@RISK Features" category of examples.

Automation of RiskOptimizer FunctionalityThe RISKOptimizer feature of @RISK is quite extensive, and has its own object model, which is described in a separate document. See the “RISKOptimizer 6.0 Developer’s Kit”

documentation for more information.

Updating @RISK 5.x Automation Code to Run with @RISK 6.0If you have @RISK automation code written for @RISK 5.x, that code should continue to work with @RISK 6.0 provided you change the references as described above. Likewise most

code written for @RISK 6.0 will work in 5.x if again you make the appropriate reference changes and if you don't use any of the new properties and methods that were added in version 6.0.

Keep in mind, the referencing scheme described above for @RISK 6.0 is somewhat different from that of @RISK versions 5.x. In that version, you only made a single reference to the

@RISK 5.0 for Excel Object Library. If you are converting automation code designed for use with @RISK 5.x to @RISK 6.0, you must remove this old reference, and make the two

Page 10: RISK Object Library - Palisade Corporation

references described above.

In @RISK version 5.7, to automate 64-bit Excel you were required to include a block of code to obtain the root automation object and access to various constant values used in the

automation library. This code block is no longer needed and should be removed from your code.

Demand-Loading @RISKUsually, you want @RISK to load automatically when you open your add-in. By adding the reference to Risk.xla in the VBA references as described above, this will occur. However, there

are some instances where this is not the desired behavior. For example, you might want to write an add-in that only uses @RISK part of the time, and requiring @RISK to always be loaded

is not appropriate. Of course, then the loading and shutdown of @RISK itself is your code’s responsibility.

If you remove the Risk.xla reference, you can still automate @RISK (provided of course that you load the @RISK add-in yourself) but you need to do some extra work to obtain the root Risk

reference object and also to use any @RISK constants defined in that file.

You can get the root Risk object in a “late-bound” fashion (that is without an early-bound reference to Risk.xla) by using Excel’s Application.Run command, as follows:

Visual Basic

Dim Risk As AtRiskOL6.Risk

Set Risk = Application.Run(“Risk.xla!Risk”)

This code assumes @RISK is already loaded and calls the public property Risk in a late-bound fashion to retrieve the root automation object. If you store as a global (non-local) variable, we

recommend you set it to Nothing when you are finished using @RISK for automation. (Strictly you could call this variable anything, but by using the variable name of “Risk” your code will

only be minimally changed.)

An other function that the early-bound reference to Risk.xla served was to provide all the automation constants (RiskAutoNumIterations, RiskNaN, etc.) that you might need for your code.

For example, in the line of code

Early Bound Method (Visual Basic)

Risk.Simulations.Settings.NumIterations = RiskAutoNumIterations

the constant RiskAutoNumIterations is provided by the reference to Risk.xla. If you choose to demand load @RISK however, and thus do not have a reference to Risk.xla, these constants

won’t be available directly. Instead you will need to access these constants from the Risk.Constants object, as demonstrated below:

Page 11: RISK Object Library - Palisade Corporation

Late-Bound Method (Visual Basic)

Risk.Simulations.Settings.NumIterations = Risk.Constants.RiskAutoNumIterations

Automating @RISK from .NETWhile the @RISK automation library is primarily designed for use from within Excel’s VBA language (and all the code examples of this documentation, excepting this section, are written for

VBA) it is also possible to use the .NET environment to control @RISK. To automate @RISK from .NET, first a reference needs to be added in the Visual Studio "Add Reference" dialog: in

the COM tab of that dialog, select "Palisade @RISK 6.0 for Excel Object Library".

Since in .NET you can’t make a reference to Risk.xla, the same issues described above for late-bound loading of @RISK apply for .NET programmers. Namely, you must get access to the

root Risk object manually, you must access @RISK constants indirectly, and @RISK won’t automatically be loaded for you.

To obtain the root Risk object, assuming @RISK is loaded, the .NET programmer must obtain it from a COM call to Excel and then store it in an object variable. The .NET programmer is

free to choose any name for that variable, but the recommended name is "Risk". With this name automation code written for .NET will be very similar to the VBA code examples used in this

document.

As with the demand-loaded @RISK described above, all @RISK constants must be accessed via the Risk.Constants object.

Here are examples of VB .NET and C# methods for a simple @RISK automation. Assuming it is passed a reference to Excel that already has @RISK loaded, it sets up the root Risk object,

sets the number of iterations to be “automatic” and then runs a simulation. These methods could be part of .NET class libraries, and those libraries could be accessed from Excel using

COM/.NET Interoperability if desired.

Note: To automate Excel, an appropriate reference and "Imports"/"using" lines need to be added. Please consult relevant documentation from Microsoft.

C#

//This code assumes "using AtRiskOL6;" line has been added, as well as an appropriate "using" line to access Excel automation interface.

public void RunSimulation(Application ExcelApplication) {

Risk Risk;

//Unfortunately C# has no support for missing arguments, thus this call to Excel’s Application.Run (which takes up to 30 optional arguments after the macro name)

Page 12: RISK Object Library - Palisade Corporation

//"Missing.Value" can be used after "using System.Reflection;" has been added.

Risk = (Risk)ExcelApplication.Run("Risk.xla!Risk", Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

Risk.Simulation.Settings.NumIterations = Risk.Constants.RiskAutoNumIterations;

Risk.Simulation.Start();

}

Visual Basic .NET

'This code assumes that "Imports AtRiskOL6" line has been added, as well as an appropriate "Imports" line to access Excel automation interface.

Public Sub RunSimulation(ByVal ExcelApplication As Application)

Dim Risk As Risk

Risk = ExcelApplication.Run("Risk.xla!Risk")

Risk.Simulation.Settings.NumIterations = Risk.Constants.RiskAutoNumIterations

Risk.Simulation.Start()

End Sub

© Palisade Corporation. All Rights Reserved.

Page 13: RISK Object Library - Palisade Corporation

For a list of all members defined in this module, see CellFormattingDialog members.

See Also

CellFormattingDialog Members

© Palisade Corporation. All Rights Reserved.

CellFormattingDialog Form

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 14: RISK Object Library - Palisade Corporation

Public Methods

ShowDialog

See Also

CellFormattingDialog Overview

© Palisade Corporation. All Rights Reserved.

CellFormattingDialog Form Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 15: RISK Object Library - Palisade Corporation

Syntax

Public Function ShowDialog( _

ByVal p_ApplicationSettings As RiskApplicationSettings _

) As Boolean

Parameters

p_ApplicationSettings

See Also

CellFormattingDialog Form

© Palisade Corporation. All Rights Reserved.

ShowDialog Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 16: RISK Object Library - Palisade Corporation

Description

The root @RISK application object.

For a list of all members defined in this module, see Risk members.

Object Model

Risk Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 17: RISK Object Library - Palisade Corporation

Remarks

This object is available globally (in VBA) once you have made reference to the @RISK Developer's Kit Library.

See Also

Risk Members

© Palisade Corporation. All Rights Reserved.

Page 18: RISK Object Library - Palisade Corporation

Public Methods

GenerateExcelReports Creates one or more @RISK reports in Excel.

Help Displays @RISK context help

Sample Returns a sample from an @RISK distribution.

UnloadAddin Asynchronously shuts down @RISK.

WriteWorkbookInformation Writes @RISK information to the specified Excel workbook.

Public Properties

Addin Returns an Excel Workbook object for the @RISK add-in (.xla) file.

ApplicationSettings Returns a RISKApplicationSettings object, which contains all the user controllable @RISK application settings.

Constants Returns an object containing all @RISK constants.

DisplayAlerts Controls whether @RISK will display messages during execution.

ExcelApplication Returns the Excel Application object which @RISK is working within.

Fits Returns a collection of fits currently defined in the @RISK application.

InterfaceHidden Indicates whether the @RISK user interface has been hidden.

InterfaceMode Returns the current "interface" mode of @RISK. This property can be used to determine the state of operation of the

product.

Library Returns a RiskLibraryServer Object which allows you to interact with the @RISK Library.

Model Returns a RiskModel Object, from which you can bring up modeling dialogs, swap functions, etc.

Risk Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 19: RISK Object Library - Palisade Corporation

ProductInformation Returns a RiskProductInformation Object which contains information about the current running copy of @RISK.

Project

Simulation Returns a RiskSimulation Object, from which you can change simulation settings, start an @RISK simualation, and get

the results of a simulation.

Events

ApplicationSettingsChanged Raised when any settings in the RiskApplicationSettings object have been changed by the user.

UserInterfaceModeChanged Raised when @RISK's interface mode is changing.

See Also

Risk Overview

© Palisade Corporation. All Rights Reserved.

Page 20: RISK Object Library - Palisade Corporation

Description

Creates one or more @RISK reports in Excel.

Syntax

Public Function GenerateExcelReports( _

ByVal p_WhichReports As RiskReportSelection _

) As Workbook

Parameters

p_WhichReports

GenerateExcelReports Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 21: RISK Object Library - Palisade Corporation

Value Description

RiskSimulationReportQuick A "Quick" Report, one page per output, with a summary of the most important information for each output.

RiskSimulationReportInputResultsSummary A summary report of all the simulated inputs. This matches the information in the Input tab of the @RISK Results

Summary window.

RiskSimulationReportOutputResultsSummary A summary report of all the simulated outputs. This matches the information in the Output tab of the @RISK Results

Summary window.

RiskSimulationReportDetailedStatistics A set of detailed statistical results for all inputs and outputs. This matches the information in the @RISK Detailed

Statistics window.

RiskSimulationReportData The complete set of simulation data for all inputs and outputs. This matches the information in the @RISK Data

window.

RiskSimulationReportSensitivity The sensitivity results for all outputs. This matches the information in the @RISK Sensitivities window.

RiskSimulationReportScenarios The scenarios report for all outputs. This matches the information in the @RISK Scenarios window.

RiskSimulationReportTemplateSheets A static copy of all open template sheet. Template sheets must start with the prefix "RiskTemplate_".

RiskModelReportInputs A report summarizing all the currently defined inputs. This matches the information in the Inputs tab of the @RISK

Model window.

RiskModelReportOutputs A report summarizing all the currently defined outputs. This matches the information in the Outputs tab of

the @RISK Model window.

RiskModelReportCorrelations A report summarizing all the currently defined correlations. This matches the information in the Correlations tab of

the @RISK Model window.

Return Type

Excel Workbook Object - the workbook where the reports were created.

Remarks

You can add the various report constants together to generate multiple reports at the same time.

The user's current report selection can be gotten from Risk.SimulationSettings.ReportsToGenerate property.

Page 22: RISK Object Library - Palisade Corporation

The placement of the reports is controled by several report settings in the Risk.ApplicationSettings object.

Example

[[New Example] (Visual Basic)]

'Run a simulation and then generate the input and output result summary reports

Public Sub GenerateResultSummaryReports()

Risk.Simulation.Start

Risk.GenerateExcelReports RiskSimulationReportInputResultsSummary + RiskSimulationReportOutputResultsSummary

End Sub

See Also

Risk Object | ReportGraphFormat Property | ReportOverwriteExisting Property | ReportPlacement Property | ReportReuseNewWorkbook Property | ReportSelected Property

| ReportsToGenerate Property | AutomaticallyGenerateReports Property | RiskReportSelection Enumeration

© Palisade Corporation. All Rights Reserved.

Page 23: RISK Object Library - Palisade Corporation

Description

Displays @RISK context help

Syntax

Public Sub Help( _

Optional ByVal p_ContextID As Long _

)

Parameters

p_ContextID

The context identifier for the help file page that should be displayed. If left blank, the file will display the first page.

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Help Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 24: RISK Object Library - Palisade Corporation

Description

Returns a sample from an @RISK distribution.

Syntax

Public Function Sample( _

ByVal p_Expression As String, _

Optional ByVal p_ContextWorksheet As Worksheet = Nothing _

) As Variant

Parameters

p_Expression

An @RISK distribution function. The must be specified in US/English format and have standard @RISK function syntax. It may have references to spreadsheet cells (in A1 format

only) but those references will be resolved with respect to the ContextWorksheet argument.

p_ContextWorksheet

An optional worksheet parameter which is used to resolve any spreadsheet references in the specified expression. If omitted, the active worksheet is implied.

Return Type

Variant - Most often this will be a numeric value. However, illegal distribution definition will return error variants in the standard Excel manner. For example, Excel's #VALUE! error is

represented by an Error Variant of type 2015.

Example

[[New Example] (Visual Basic)]

'Samples ten independent Normal(0,1) distributions, adds up the result, and displays it.

Public Sub SampleNormals()

Dim result As Variant

Dim i As Integer

For i = 1 To 10

result = result + Risk.Sample("RiskNormal(0,1)")

Next i

Sample Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 25: RISK Object Library - Palisade Corporation

MsgBox "The result is " & result

End Sub

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Page 26: RISK Object Library - Palisade Corporation

Description

Asynchronously shuts down @RISK.

Syntax

Public Sub UnloadAddin()

Remarks

The shutdown of @RISK is asynchronous. That is, it will not occur immediately when you make this call, but rather will start the shut-down process after your code has finished executing

and control has returned to Excel.

Example

[[New Example] (Visual Basic)]

Public Sub ShutDownAtRisk

Risk.UnloadAddIn

End Sub

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

UnloadAddin Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 27: RISK Object Library - Palisade Corporation

Description

Writes @RISK information to the specified Excel workbook.

Syntax

Public Sub WriteWorkbookInformation( _

ByVal p_Workbook As Workbook _

)

Parameters

p_Workbook

The workbook to which @RISK information should be written.

Remarks

When the user saves an Excel workbook with @RISK open, it automatically writes @RISK information into it. This information includes the simulation settings, fit definitions,

and simulation results if appropriate. However, if you save a workbook via code using the Workbook.Save or Workbook.SaveAs methods, this information is not automatically written into

the workbook and you must use this method to add it.

Calling this method may display an @RISK dialog, asking you for how you want to save your results. If you set the Risk.DisplayAlerts property to FALSE, this dialog will be suppressed

and the default saving options will be chosen.

If you only want to write the @RISK simulation settings to a workbook, you can call instead the Risk.Simulation.Settings.SaveToWorkbook method.

Example

[[New Example] (Visual Basic)]

'Saves the active Excel Workbook with the current @RISK information embedded in it.

'The @RISK Save dialog has been suppress during this process.

Public Function SaveWorkbookWithAtRiskInformation()

Risk.DisplayAlerts = False

Risk.WriteWorkbookInformation ActiveWorkbook

WriteWorkbookInformation Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 28: RISK Object Library - Palisade Corporation

Risk.DisplayAlerts = True

ActiveWorkbook.Save

End Function

See Also

Risk Object | DisplayAlerts Property | LoadFromWorkbook Method | SaveToWorkbook Method

© Palisade Corporation. All Rights Reserved.

Page 29: RISK Object Library - Palisade Corporation

Description

Returns an Excel Workbook object for the @RISK add-in (.xla) file.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Addin() As Workbook

Example

[[New Example] (Visual Basic)]

'Displays the full path and filename of the @RISK add-in file.

Public Sub

Dim addinWB As Workbook

Set addinWB = Risk.Addin

MsgBox addinWB.FullName

End Sub

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Addin Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 30: RISK Object Library - Palisade Corporation

Description

Returns a RISKApplicationSettings object, which contains all the user controllable @RISK application settings.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ApplicationSettings() As RiskApplicationSettings

See Also

Risk Object | RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ApplicationSettings Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 31: RISK Object Library - Palisade Corporation

Description

Returns an object containing all @RISK constants.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Constants() As RiskConstants

Remarks

NOTE: These constants need only be used from this object when demand-loading @RISK for automation, or automation from .NET. For normal VBA development, these constants are

available directly from Risk.xla.

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Constants Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 32: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will display messages during execution.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DisplayAlerts() As Boolean

Remarks

Macro developers may want to turn this message off to suppress the display of @RISK messages. For example, a confirmation message displayed by @RISK will pause the execution of

a macro until the user clicks a button. This is very similar to the property of Excel with the same name. You should be sure to turn this property back to TRUE when your macro has

finished.

Example

[[New Example] (Visual Basic)]

'Perform a fit without displaying the fit status window

Public Sub FitWithNoMessages()

Dim fitResults As RiskFitResultCollection

Dim fittedFunction As String

Risk.DisplayAlerts = False

Set fitResults = Risk.Fits(1).PerformFit

fittedFunction = fitResults("Normal").DistributionFunction

Risk.DisplayAlerts = True

MsgBox fittedFunction

End Sub

DisplayAlerts Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 33: RISK Object Library - Palisade Corporation

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Page 34: RISK Object Library - Palisade Corporation

Description

Returns the Excel Application object which @RISK is working within.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ExcelApplication() As Application

Example

[[New Example] (Visual Basic)]

'Displays the version of Excel that @RISK is being used with

Public Sub DisplayExcelVersion

MsgBox Risk.ExcelApplication.Version

End Sub

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

ExcelApplication Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 35: RISK Object Library - Palisade Corporation

Description

Returns a collection of fits currently defined in the @RISK application.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Fits() As RiskFitDefinitionCollection

See Also

Risk Object | RiskFitDefinitionCollection Object

© Palisade Corporation. All Rights Reserved.

Fits Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 36: RISK Object Library - Palisade Corporation

Description

Indicates whether the @RISK user interface has been hidden.

Property type

Read-write property

Syntax (Visual Basic)

Public Property InterfaceHidden() As Boolean

Remarks

Note: Hiding the user interface does not prevent all @RISK windows from being displayed. It just hides the @RISK menus, ribbons, and toolbars.

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

InterfaceHidden Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 37: RISK Object Library - Palisade Corporation

InterfaceMode Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 38: RISK Object Library - Palisade Corporation

Description

Returns the current "interface" mode of @RISK. This property can be used to determine the state of operation of the product.

Property type

Read-only property

Syntax (Visual Basic)

Public Property InterfaceMode() As RiskInterfaceMode

Remarks

Many @RISK actions can only be performed in a particular mode. For example, you can not perform a fit while @RISK is the middle of running a simulation. You can use this property to

check and respond appropriately to this type of situation.

Example

[[New Example] (Visual Basic)]

'Check if we are in "Standard Mode" before doing something

Public Sub DoSomethingOnlyIfInStandardMode()

If Risk.InterfaceMode <> RiskStandardOperation Then

MsgBox "This action can not be performed at this time."

Exit Sub

End If

'Proceed with the rest of the macro here...

End Sub

See Also

Risk Object

Page 39: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 40: RISK Object Library - Palisade Corporation

Description

Returns a RiskLibraryServer Object which allows you to interact with the @RISK Library.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Library() As RiskLibraryServer

See Also

Risk Object | RiskLibraryServer Object

© Palisade Corporation. All Rights Reserved.

Library Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 41: RISK Object Library - Palisade Corporation

Description

Returns a RiskModel Object, from which you can bring up modeling dialogs, swap functions, etc.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Model() As RiskModel

See Also

Risk Object | RiskModel Object

© Palisade Corporation. All Rights Reserved.

Model Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 42: RISK Object Library - Palisade Corporation

Description

Returns a RiskProductInformation Object which contains information about the current running copy of @RISK.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ProductInformation() As RiskProductInformation

See Also

Risk Object | RiskProductInformation Object

© Palisade Corporation. All Rights Reserved.

ProductInformation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 43: RISK Object Library - Palisade Corporation

Property type

Read-only property

Syntax (Visual Basic)

Public Property Project() As RiskProject

See Also

Risk Object

© Palisade Corporation. All Rights Reserved.

Project Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 44: RISK Object Library - Palisade Corporation

Description

Returns a RiskSimulation Object, from which you can change simulation settings, start an @RISK simualation, and get the results of a simulation.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Simulation() As RiskSimulation

See Also

Risk Object | RiskSimulation Object

© Palisade Corporation. All Rights Reserved.

Simulation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 45: RISK Object Library - Palisade Corporation

Description

Raised when any settings in the RiskApplicationSettings object have been changed by the user.

Syntax

Public Event ApplicationSettingsChanged()

See Also

Risk Object | RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ApplicationSettingsChanged Event

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 46: RISK Object Library - Palisade Corporation

Description

Raised when @RISK's interface mode is changing.

Syntax

Public Event UserInterfaceModeChanged( _

ByVal oldMode As RiskInterfaceMode, _

ByVal newMode As RiskInterfaceMode _

)

Parameters

oldMode

Value Description

RiskDisabledInterface For internal use only.

RiskStandardOperation The normal operational mode of @RISK.

RiskDefiningDistributions The Define Distribution window is being displayed.

RiskSimulating A simulation is in progress.

RiskBrowsingResults The Browse Results window is being displayed.

RiskApplicationInitializing The @RISK application is in the processing of starting.

RiskApplicationTerminating The @RISK application is in the processing of shutting down.

RiskFunctionsRemoved @RISK is in "swapped out" mode, where all @RISK functions have been removed.

The old interface mode being switched out of.

newMode

Value Description

UserInterfaceModeChanged Event

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 47: RISK Object Library - Palisade Corporation

RiskDisabledInterface For internal use only.

RiskStandardOperation The normal operational mode of @RISK.

RiskDefiningDistributions The Define Distribution window is being displayed.

RiskSimulating A simulation is in progress.

RiskBrowsingResults The Browse Results window is being displayed.

RiskApplicationInitializing The @RISK application is in the processing of starting.

RiskApplicationTerminating The @RISK application is in the processing of shutting down.

RiskFunctionsRemoved @RISK is in "swapped out" mode, where all @RISK functions have been removed.

The new interface mode being switched into.

See Also

Risk Object | InterfaceMode Property

© Palisade Corporation. All Rights Reserved.

Page 48: RISK Object Library - Palisade Corporation

Description

Defines an advanced sensitivity analysis

For a list of all members defined in this module, see RiskAdvSensAnalysis members.

Object Model

Example

[Visual Basic]

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"))

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.BaseValue = 50

End With

.ReportPlacement = RiskNewWorkbook

.RunAnalysis

End With

End Sub

RiskAdvSensAnalysis Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 49: RISK Object Library - Palisade Corporation

See Also

RiskAdvSensAnalysis Members | NewAdvSensitivityAnalysis Method | RiskAdvSensInput Object | RiskAdvSensInputCollection Object

© Palisade Corporation. All Rights Reserved.

Page 50: RISK Object Library - Palisade Corporation

Public Methods

RunAnalysis Runs the analysis defined in the object.

WriteSettingsToWorkbook Writes the current object settings to the specified workbook.

Public Properties

AnalyzeSimtableFunctions Specifies whether RiskSimtable function will automatically be included as inputs in the analysis.

IncludeBoxWhiskerPlot Specifies whether the analysis results should include a box-whisker plot.

IncludeInputGraphs Specifies whether the analysis results should include input graphs.

IncludePercentChangeGraph Specifies whether the analysis results should include a percentile graph graph.

IncludePercentilesGraph Specifies whether the analysis results should include a graph of percentiles.

IncludeQuickReport Specifies whether the analysis results should include an output quick report.

IncludeSummaryReport Specifies whether the analysis results should include a summary report.

IncludeTornadoDiagram Specifies whether the analysis results should include a tornado diagram.

Inputs Returns a collection of sensitivity analysis inputs.

OutputCell Specifies the sensitivity analysis output cell.

OutputPercentile Specifies which percentile should be calculated for the sensitibity analysis output.

OutputStatistic Specifies what statistic is used for the sensitivity analysis output.

ReportPlacement Specifies what workbook the analysis report will be placed in.

RiskAdvSensAnalysis Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 51: RISK Object Library - Palisade Corporation

See Also

RiskAdvSensAnalysis Overview | NewAdvSensitivityAnalysis Method | RiskAdvSensInput Object | RiskAdvSensInputCollection Object

© Palisade Corporation. All Rights Reserved.

Page 52: RISK Object Library - Palisade Corporation

Description

Runs the analysis defined in the object.

Syntax

Public Sub RunAnalysis()

Example

[Visual Basic]

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"))

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.BaseValue = 50

End With

.ReportPlacement = RiskNewWorkbook

.RunAnalysis

End With

End Sub

See Also

RunAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 53: RISK Object Library - Palisade Corporation

RiskAdvSensAnalysis Object

© Palisade Corporation. All Rights Reserved.

Page 54: RISK Object Library - Palisade Corporation

Description

Writes the current object settings to the specified workbook.

Syntax

Public Sub WriteSettingsToWorkbook( _

ByVal p_Workbook As Workbook _

)

Parameters

p_Workbook

The Excel workbook where the goal seek settings are to be written.

Remarks

Once settings are written, they can be retrieved when creating a new RiskAdvSensAnalysis object by specifying the SourceWorkbook parameter.

See Also

RiskAdvSensAnalysis Object

© Palisade Corporation. All Rights Reserved.

WriteSettingsToWorkbook Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 55: RISK Object Library - Palisade Corporation

Description

Specifies whether RiskSimtable function will automatically be included as inputs in the analysis.

Property type

Read-write property

Syntax (Visual Basic)

Public Property AnalyzeSimtableFunctions() As Boolean

See Also

RiskAdvSensAnalysis Object

© Palisade Corporation. All Rights Reserved.

AnalyzeSimtableFunctions Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 56: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a box-whisker plot.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeBoxWhiskerPlot() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeInputGraphs Property | IncludePercentChangeGraph Property | IncludePercentilesGraphs Property | IncludeQuickReport Property

| IncludeSummaryReport Property | IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludeBoxWhiskerPlot Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 57: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include input graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeInputGraphs() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeBoxWhiskerPlot Property | IncludePercentChangeGraph Property | IncludePercentilesGraphs Property | IncludeQuickReport Property

| IncludeSummaryReport Property | IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludeInputGraphs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 58: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a percentile graph graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludePercentChangeGraph() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeInputGraphs Property | IncludePercentilesGraphs Property | IncludePercentilesGraphs Property

| IncludeQuickReport Property | IncludeSummaryReport Property | IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludePercentChangeGraph Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 59: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a graph of percentiles.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludePercentilesGraph() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeInputGraphs Property | IncludePercentChangeGraph Property | IncludeQuickReport Property

| IncludeQuickReport Property | IncludeSummaryReport Property | IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludePercentilesGraph Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 60: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include an output quick report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeQuickReport() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeInputGraphs Property | IncludePercentChangeGraph Property | IncludePercentilesGraphs Property

| IncludeSummaryReport Property | IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludeQuickReport Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 61: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a summary report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeSummaryReport() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeInputGraphs Property | IncludePercentChangeGraph Property | IncludePercentilesGraphs Property | IncludeQuickReport Property

| IncludeTornadoDiagram Property

© Palisade Corporation. All Rights Reserved.

IncludeSummaryReport Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 62: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a tornado diagram.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeTornadoDiagram() As Boolean

See Also

RiskAdvSensAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeInputGraphs Property | IncludePercentChangeGraph Property | IncludePercentilesGraphs Property

| IncludeQuickReport Property | IncludeSummaryReport Property

© Palisade Corporation. All Rights Reserved.

IncludeTornadoDiagram Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 63: RISK Object Library - Palisade Corporation

Description

Returns a collection of sensitivity analysis inputs.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Inputs() As RiskAdvSensInputCollection

Example

[Visual Basic]

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"))

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.BaseValue = 50

End With

.ReportPlacement = RiskNewWorkbook

.RunAnalysis

End With

Inputs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 64: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskAdvSensAnalysis Object | RiskStressInputCollection Object | RiskAdvSensInput Object

© Palisade Corporation. All Rights Reserved.

Page 65: RISK Object Library - Palisade Corporation

Description

Specifies the sensitivity analysis output cell.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputCell() As Range

Remarks

The cell must be an @RISK output. If a cell that is not an @RISK output is selected, it will automatically become an @RISK output when the analysis is run.

Example

[Visual Basic]

'Set up a sensitivity analysis on the 95% of the output in cell B5

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

'Continue here with code to setup and run the analysis...

End With

End Sub

See Also

RiskAdvSensAnalysis Object | OutputPercentile Property | OutputStatistic Property | OutputStatistic Property

OutputCell Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 66: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 67: RISK Object Library - Palisade Corporation

Description

Specifies which percentile should be calculated for the sensitibity analysis output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputPercentile() As Double

Remarks

This property only has effect if the OutputStatistic Property is set to RiskStatisticPercentile.

The value must be between 0 and 1.

Example

[Visual Basic]

'Set up a sensitivity analysis on the 95% of the output in cell B5

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

'Continue here with code to setup and run the analysis...

End With

End Sub

See Also

OutputPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 68: RISK Object Library - Palisade Corporation

RiskAdvSensAnalysis Object | OutputCell Property | OutputStatistic Property

© Palisade Corporation. All Rights Reserved.

Page 69: RISK Object Library - Palisade Corporation

Description

Specifies what statistic is used for the sensitivity analysis output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputStatistic() As RiskStatisticType

Remarks

If this property is set to RiskStatisticPercentile, the specific percentile to use is specified in the OutputPercentile Property.

Example

[Visual Basic]

'Set up a sensitivity analysis on the 95% of the output in cell B5

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

'Continue here with code to setup and run the analysis...

End With

End Sub

See Also

RiskAdvSensAnalysis Object | OutputCell Property | OutputStatistic Property

OutputStatistic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 70: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 71: RISK Object Library - Palisade Corporation

Description

Specifies what workbook the analysis report will be placed in.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportPlacement() As RiskReportPlacement

See Also

RiskAdvSensAnalysis Object

© Palisade Corporation. All Rights Reserved.

ReportPlacement Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 72: RISK Object Library - Palisade Corporation

Description

Defines an input for an advanced sensitivity analysis.

For a list of all members defined in this module, see RiskAdvSensInput members.

Example

[Visual Basic]

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"))

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.BaseValue = 50

End With

.ReportPlacement = RiskNewWorkbook

.RunAnalysis

End With

End Sub

See Also

RiskAdvSensInput Members | RiskAdvSensAnalysis Object | RiskAdvSensInputCollection Object

RiskAdvSensInput Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 73: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 74: RISK Object Library - Palisade Corporation

Public Methods

AddInputReference Adds an input reference to this object.

AnalysisNames_GetArray Returns the array of simulation names associated with this input.

AnalysisNames_SetArray Set the analysis names for the simulations associated with this input.

ClearInputReferences Clears all input references.

GetInputReferenceInfo Retrieves information about a single input reference.

RemoveInputReference Removes an input reference.

VariationPercentiles_GetArray Returns an array of percentiles used to define the input's variation.

VariationPercentiles_SetArray Sets an array of percentiles used to define the input's variation.

VariationValues_GetArray Returns an array of actual values used to define the input's variation.

VariationValues_SetArray Sets an array of actual values used to define the input's variation.

Public Properties

BaseValue Specifies the base value of the input.

Enabled Specifies whether this input is enabled.

FixDistributionsWhenNotStepping Specifies that distributions that are not being varied should be fixed.

InputReferenceCount Returns the number of cell/function references in this input.

InputType Indicates if a sensitivity analysis input is adjusting an entire cell or a distribution function.

RiskAdvSensInput Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 75: RISK Object Library - Palisade Corporation

VariationMaximum Specifies the maximum input variation.

VariationMethod Specifies how the sensitivity input will be varied.

VariationMinimum Specifies the minimum input variation.

VariationNumSteps Specifies the number of steps in the input variation.

VariationTableRange Specifies an Excel range to get input values from.

See Also

RiskAdvSensInput Overview | RiskAdvSensAnalysis Object | RiskAdvSensInputCollection Object

© Palisade Corporation. All Rights Reserved.

Page 76: RISK Object Library - Palisade Corporation

Description

Adds an input reference to this object.

Syntax

Public Sub AddInputReference( _

ByVal p_Cell As Range, _

Optional ByRef p_AlternateName As String = "", _

Optional ByRef p_DistributionFunctionPosition As Integer = 1 _

)

Parameters

p_Cell

Specifies a cell reference for the input reference. This must be a single cell.

p_AlternateName

Optionally specifies an alternate name for the input. This argument only applies if the InputType Property is RiskSensAnalysisCellBasedInput.

p_DistributionFunctionPosition

Optionally specifies an @RISK functional position for the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates

the first @RISK distribution, 2 the second, and so on. This argument only applies if the InputType Property is RiskSensAnalysisDistributionBasedInput.

Remarks

When an input if created with Add Method, you can specify a single input cell, name, and function position. If that is the only cell reference you want in the input, you need do nothing

else. However, you may want to specify a compound input with more than one cell reference in a single input. In that case, this method must be used to add that additional items.

Example

[Visual Basic]

Public Sub MakeCompoundSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput)

.AddInputReference ActiveSheet.Range("A1"), "First Cell"

.AddInputReference ActiveSheet.Range("A2"), "Second Cell"

.AddInputReference ActiveSheet.Range("A3"), "Third Cell"

AddInputReference Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 77: RISK Object Library - Palisade Corporation

.BaseValue = 5

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 10

.VariationNumSteps = 11

End With

End Sub

See Also

RiskAdvSensInput Object | ClearInputReferences Method | GetInputReferenceInfo Method | RemoveInputReference Method | InputReferenceCount Property | Add Method

© Palisade Corporation. All Rights Reserved.

Page 78: RISK Object Library - Palisade Corporation

Description

Returns the array of simulation names associated with this input.

Syntax

Public Function AnalysisNames_GetArray( _

ByRef p_Array() As String _

) As Integer

Parameters

p_Array

An array that is filled with analysis names.

Return Type

Integer - the number of defined analysis names.

Remarks

It is not necessary analysis names to be defined. If they are defined, however, they will override the default names used by the analysis.

See Also

RiskAdvSensInput Object | AnalysisNames_SetArray Method

© Palisade Corporation. All Rights Reserved.

AnalysisNames_GetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 79: RISK Object Library - Palisade Corporation

Description

Set the analysis names for the simulations associated with this input.

Syntax

Public Sub AnalysisNames_SetArray( _

ByRef p_Array() As String _

)

Parameters

p_Array

The array of analysis names.

Remarks

It is not necessary analysis names to be defined. If they are defined, however, they will override the default names used by the analysis.

See Also

RiskAdvSensInput Object | AnalysisNames_GetArray Method

© Palisade Corporation. All Rights Reserved.

AnalysisNames_SetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 80: RISK Object Library - Palisade Corporation

Description

Clears all input references.

Syntax

Public Sub ClearInputReferences()

See Also

RiskAdvSensInput Object | AddInputReference Method | GetInputReferenceInfo Method | RemoveInputReference Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

ClearInputReferences Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 81: RISK Object Library - Palisade Corporation

Description

Retrieves information about a single input reference.

Syntax

Public Function GetInputReferenceInfo( _

ByVal p_Index As Integer, _

Optional ByRef p_Cell As Range, _

Optional ByRef p_AlternateName As String, _

Optional ByRef p_DistributionFunctionPosition As Integer _

) As Range

Parameters

p_Index

Indicates for which input reference information is being sought.

p_Cell

Returns the single cell where the input reference is located.

p_AlternateName

Returns the alternate cell name for the input. This is only relevant if the InputType Property is RiskSensAnalysisCellBasedInput.

p_DistributionFunctionPosition

The functional position of the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates the first @RISK distribution,

2 the second, and so on. This argument only applies if the InputType Property is RiskSensAnalysisDistributionBasedInput.

See Also

RiskAdvSensInput Object | AddInputReference Method | ClearInputReferences Method | RemoveInputReference Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

GetInputReferenceInfo Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 82: RISK Object Library - Palisade Corporation

Description

Removes an input reference.

Syntax

Public Sub RemoveInputReference( _

ByVal p_Index As Integer _

)

Parameters

p_Index

The index of the input reference being removed.

See Also

RiskAdvSensInput Object | AddInputReference Method | ClearInputReferences Method | GetInputReferenceInfo Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

RemoveInputReference Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 83: RISK Object Library - Palisade Corporation

Description

Returns an array of percentiles used to define the input's variation.

Syntax

Public Function VariationPercentiles_GetArray( _

ByRef p_Array() As Double _

) As Integer

Parameters

p_Array

The array which will be filled with percentile values. Each value is between 0 and 1.

Return Type

Integer - the number of percentiles.

Remarks

This method is only relevant if the input's InputType Property is RiskSensAnalysisDistributionBasedInput and the VariationMethod Property is set to RiskVariationDistributionPercentiles.

See Also

RiskAdvSensInput Object | VariationPercentiles_SetArray Method

© Palisade Corporation. All Rights Reserved.

VariationPercentiles_GetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 84: RISK Object Library - Palisade Corporation

Description

Sets an array of percentiles used to define the input's variation.

Syntax

Public Sub VariationPercentiles_SetArray( _

ByRef p_Array() As Double _

)

Parameters

p_Array

The array of percentile values. Each value is between 0 and 1.

Remarks

This method is only relevant if the input's InputType Property is RiskSensAnalysisDistributionBasedInput and the VariationMethod Property is set to RiskVariationDistributionPercentiles.

See Also

RiskAdvSensInput Object | VariationPercentiles_GetArray Method

© Palisade Corporation. All Rights Reserved.

VariationPercentiles_SetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 85: RISK Object Library - Palisade Corporation

Description

Returns an array of actual values used to define the input's variation.

Syntax

Public Function VariationValues_GetArray( _

ByRef p_Array() As Double _

) As Integer

Parameters

p_Array

The array which will be filled with values.

Return Type

Integer - the number of values in the array.

Remarks

This method is only relevant if the input's InputType Property is RiskSensAnalysisDistributionBasedInput and the VariationMethod Property is set to RiskVariationValuesFromTable.

See Also

RiskAdvSensInput Object | VariationValues_SetArray Method

© Palisade Corporation. All Rights Reserved.

VariationValues_GetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 86: RISK Object Library - Palisade Corporation

Description

Sets an array of actual values used to define the input's variation.

Syntax

Public Sub VariationValues_SetArray( _

ByRef p_Array() As Double _

)

Parameters

p_Array

The array of values.

Remarks

This method is only relevant if the input's InputType Property is RiskSensAnalysisDistributionBasedInput and the VariationMethod Property is set to RiskVariationValuesFromTable.

See Also

RiskAdvSensInput Object | VariationValues_GetArray Method

© Palisade Corporation. All Rights Reserved.

VariationValues_SetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 87: RISK Object Library - Palisade Corporation

Description

Specifies the base value of the input.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BaseValue() As Double

Remarks

The base-value is used to determine the values taken by the input during the analysis if the VariationMethod Property is RiskVariationPercentChangeFromBaseValue or

RiskVariationActualChangeFromBaseValue.

The special value RiskAutoBaseValue can be use to specify the input base value is taken from the cell where the input resides.

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies +/- 10% from the base-value of 100 in 5 steps.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.BaseValue = 100

.VariationMethod = RiskVariationPercentChangeFromBaseValue

.VariationMinimum = -0.1 '-10%

.VariationMaximum = 0.1 '+10%

.VariationNumSteps = 5

End With

End Sub

See Also

RiskAdvSensInput Object | VariationMethod Property | VariationMinimum Property | VariationMaximum Property | VariationNumSteps Property

BaseValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 88: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 89: RISK Object Library - Palisade Corporation

Description

Specifies whether this input is enabled.

Property type

Read-write property

Syntax (Visual Basic)

Public Property Enabled() As Boolean

Remarks

Disabled inputs are not included in the analysis. By default inputs are enabled.

See Also

RiskAdvSensInput Object

© Palisade Corporation. All Rights Reserved.

Enabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 90: RISK Object Library - Palisade Corporation

Description

Specifies that distributions that are not being varied should be fixed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FixDistributionsWhenNotStepping() As Boolean

See Also

RiskAdvSensInput Object

© Palisade Corporation. All Rights Reserved.

FixDistributionsWhenNotStepping Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 91: RISK Object Library - Palisade Corporation

Description

Returns the number of cell/function references in this input.

Property type

Read-only property

Syntax (Visual Basic)

Public Property InputReferenceCount() As Integer

See Also

RiskAdvSensInput Object | AddInputReference Method | GetInputReferenceInfo Method | ClearInputReferences Method | RemoveInputReference Method

© Palisade Corporation. All Rights Reserved.

InputReferenceCount Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 92: RISK Object Library - Palisade Corporation

Description

Indicates if a sensitivity analysis input is adjusting an entire cell or a distribution function.

Property type

Read-only property

Syntax (Visual Basic)

Public Property InputType() As RiskSensAnalysisInputType

Remarks

This property is set when the input is created and can not be changed later.

See Also

RiskAdvSensInput Object | Add Method

© Palisade Corporation. All Rights Reserved.

InputType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 93: RISK Object Library - Palisade Corporation

Description

Specifies the maximum input variation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationMaximum() As Double

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies +/- 10% from the base-value of 100 in 5 steps.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.BaseValue = 100

.VariationMethod = RiskVariationPercentChangeFromBaseValue

.VariationMinimum = -0.1 '-10%

.VariationMaximum = 0.1 '+10%

.VariationNumSteps = 5

End With

End Sub

See Also

RiskAdvSensInput Object | BaseValue Property | VariationMethod Property | VariationMinimum Property | VariationNumSteps Property

VariationMaximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 94: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 95: RISK Object Library - Palisade Corporation

Description

Specifies how the sensitivity input will be varied.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationMethod() As RiskAdvSensVariationMethod

Remarks

If set to either RiskVariationPercentChangeFromBaseValue, RiskVariationActualChangeFromBaseValue, or RiskVariationMinMaxRange, the BaseValue Property, VariationMinimum

Property, VariationMaximum Property, and VariationNumSteps Property are used to specify the other variation parameters.

If set to RiskVariationDistributionPercentiles, use the VariationPercentiles_SetArray Method to specify the percentiles values to use.

If set to RiskVariationValuesFromTable, use the VariationValues_SetArray Method to specify the values to use.

If set to RiskVariationValuesFromExcelRange, use the VariationTableRange Property property to specify an Excel range that contain the values to use.

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies +/- 10% from the base-value of 100 in 5 steps.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.BaseValue = 100

.VariationMethod = RiskVariationPercentChangeFromBaseValue

.VariationMinimum = -0.1 '-10%

.VariationMaximum = 0.1 '+10%

.VariationNumSteps = 5

End With

VariationMethod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 96: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskAdvSensInput Object | BaseValue Property | VariationMaximum Property | VariationMinimum Property | VariationNumSteps Property | VariationTableRange Property

© Palisade Corporation. All Rights Reserved.

Page 97: RISK Object Library - Palisade Corporation

Description

Specifies the minimum input variation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationMinimum() As Double

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies +/- 10% from the base-value of 100 in 5 steps.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.BaseValue = 100

.VariationMethod = RiskVariationPercentChangeFromBaseValue

.VariationMinimum = -0.1 '-10%

.VariationMaximum = 0.1 '+10%

.VariationNumSteps = 5

End With

End Sub

See Also

RiskAdvSensInput Object | BaseValue Property | VariationMaximum Property | VariationMethod Property | VariationNumSteps Property

VariationMinimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 98: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 99: RISK Object Library - Palisade Corporation

Description

Specifies the number of steps in the input variation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationNumSteps() As Integer

Remarks

This property only has effect if the VariationMethod Property RiskVariationPercentChangeFromBaseValue, RiskVariationActualChangeFromBaseValue, or RiskVariationMinMaxRange

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies +/- 10% from the base-value of 100 in 5 steps.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.BaseValue = 100

.VariationMethod = RiskVariationPercentChangeFromBaseValue

.VariationMinimum = -0.1 '-10%

.VariationMaximum = 0.1 '+10%

.VariationNumSteps = 5

End With

End Sub

See Also

RiskAdvSensInput Object

VariationNumSteps Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 100: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 101: RISK Object Library - Palisade Corporation

Description

Specifies an Excel range to get input values from.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationTableRange() As Range

Remarks

This property only has effect if the VariationMethod Property is RiskVariationValuesFromExcelRange.

Example

[Visual Basic]

'Make a new input in cell A1 that pulls variation values from cell range B1:G1

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"), "My Input")

.VariationMethod = RiskVariationValuesFromExcelRange

Set .VariationTableRange = ActiveSheet.Range("B1:G1")

End With

See Also

RiskAdvSensInput Object | VariationMethod Property

© Palisade Corporation. All Rights Reserved.

VariationTableRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 102: RISK Object Library - Palisade Corporation

Description

A collection of RiskAdvSensInput Objects.

For a list of all members defined in this module, see RiskAdvSensInputCollection members.

Object Model

See Also

RiskAdvSensInputCollection Members | RiskAdvSensAnalysis Object | RiskStressInput Object

© Palisade Corporation. All Rights Reserved.

RiskAdvSensInputCollection Collection

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 103: RISK Object Library - Palisade Corporation

Public Methods

Add Adds a new sensitivity input to the collection.

Public Properties

Count Returns the number of items in the collection.

Item Returns a single item in the collection.

See Also

RiskAdvSensInputCollection Overview | RiskAdvSensAnalysis Object | RiskStressInput Object

© Palisade Corporation. All Rights Reserved.

RiskAdvSensInputCollection Collection Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 104: RISK Object Library - Palisade Corporation

Description

Adds a new sensitivity input to the collection.

Syntax

Public Function Add( _

ByVal p_InputType As RiskSensAnalysisInputType, _

Optional ByVal p_InputReferenceCell As Range = Nothing, _

Optional ByVal p_AlternateName As String = "", _

Optional ByVal p_DistributionFunctionPosition As Integer = 1 _

) As RiskAdvSensInput

Parameters

p_InputType

Value Description

RiskSensAnalysisCellBasedInput The entire cell (or cells) will be changed during the sensitivity analysis.

RiskSensAnalysisDistributionBasedInput Only the @RISK distribution function in the specified cell (or cells) will be changed during the sensitivity analysis

Indicates the type of input.

p_InputReferenceCell

Optionally specifies a cell reference for the input. This must be a single cell. (Multiple cell references many be added to the same sensitivity input by calling the AddInputReference

Method multiple times for an input.)

p_AlternateName

Optionally specifies an alternate name for the input. This argument only applies if the InputType argument is RiskSensAnalysisCellBasedInput.

p_DistributionFunctionPosition

Optionally specifies an @RISK functional position for the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates

the first @RISK distribution, 2 the second, and so on. This argument only applies if the InputType argument is RiskSensAnalysisDistributionBasedInput.

Remarks

The three optional arguments to this function are a convenient shortcut for when you have a single cell or function you want to add. If you have multiple cells or functions, use the

Add Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 105: RISK Object Library - Palisade Corporation

AddInputReference Method to add them to the input.

Example

[Visual Basic]

'Add a sensitivity input at cell A1 that varies from 0-100 in 11 steps:

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskAdvSensAnalysis)

With p_Analysis.Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet("A1"), "My Input")

.BaseValue = 50

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.VariationNumSteps = 11

End With

End Sub

See Also

RiskAdvSensInputCollection Collection | RiskAdvSensInput Object

© Palisade Corporation. All Rights Reserved.

Page 106: RISK Object Library - Palisade Corporation

Description

Returns the number of items in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Count() As Integer

See Also

RiskAdvSensInputCollection Collection

© Palisade Corporation. All Rights Reserved.

Count Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 107: RISK Object Library - Palisade Corporation

Description

Returns a single item in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Item( _

ByVal p_Index As Variant _

) As RiskAdvSensInput

Parameters

p_Index

Must be a number between 1 and the number of items in the collection.

See Also

RiskAdvSensInputCollection Collection

© Palisade Corporation. All Rights Reserved.

Item Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 108: RISK Object Library - Palisade Corporation

Description

Contains a collection of properties that control general application settings.

For a list of all members defined in this module, see RiskApplicationSettings members.

Remarks

These correspond to the the @RISK program's Application Settings dialog.

See Also

RiskApplicationSettings Members

© Palisade Corporation. All Rights Reserved.

RiskApplicationSettings Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 109: RISK Object Library - Palisade Corporation

Public Methods

ApplyNow Applies current Application Settings to open windows, graphs, and workbooks.

GetDetailedStatsWindowTargets

GetScenarioDefault Returns one of the applicaton's scenario analysis defaults.

ResetToFactoryDefaults Resets the @RISK Application Settings to their default state.

SetDetailedStatsWindowTargets

SetScenarioDefault Sets one of the applicaton's scenario analysis defaults.

Public Properties

RiskApplicationSettings Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 110: RISK Object Library - Palisade Corporation

AltParamDefaults Controls the default alternate parameterization for a specified distribution type.

CellFormattingInputColor Controls the (RGB) color to be used when @RISK automatically formats cells containing @RISK input distributions.

CellFormattingOptimizerVariableColor

CellFormattingOutputColor Controls the (RGB) color to be used when @RISK automatically formats cells containing @RISK output functions.

CellFormattingStatisticColor

CellFormattingStyle Controls how @RISK will automatically format spreadsheet cells containing @RISK input or output functions.

CumulativeDescendingPercentiles Sets whether @RISK will display percentiles in cumulative descending format.

DistributionEntryDisplayShiftFactor Controls whether a shift factor entry will be displayed by default in the define distribution window, even if a shift

factor is not present in the distribution being edited.

DistributionEntryDisplayStaticValue Controls whether a static value entry will be displayed by default in the define distribution window, even if a static

value is not present in the distribution being edited.

DistributionEntryDisplayTruncationLimits Controls whether truncation limits entries will be displayed by default in the define distribution window, even if a

truncation limits are not present in the distribution being edited.

GraphBoxPlotCenterline Controls the centerline statistic used for box-plots.

GraphBoxPlotColor Controls the color used for box-plot graphs.

GraphBoxPlotFormattingIsAutomatic Controls whether box-plots are formatted automatically.

GraphBoxPlotInnerRange Controls the bounds of the box in a box-plot.

GraphBoxPlotOuterRange Controls the bounds of the whiskers in a box-plot.

GraphBoxPlotShowCenterlineLabels Controls whether the centerline value are displayed on a box-plot.

GraphDistributionSecondaryAxisOverlay Controls if a cumulative overlay curve is automatically added to distribution graphs.

GraphInputColor Controls the default (RGB) color applied to the curves representing inputs in an @RISK graph.

GraphLeftDelimiter Controls the default value for a distribution graph's left delimiter percentile.

Page 111: RISK Object Library - Palisade Corporation

GraphLegendTableDefinition Controls what items appear by default on a graph's legend.

GraphLegendView

GraphLegendViewString

GraphMarkerDefinition Controls what items appear by default as marked items on a graph.

GraphNumberFormatQuantitiesWithUnits Controls the number formatting used for graph statistics that have scaled units.

GraphNumberFormattingIsAutomatic Controls whether the number formatting used in graph statistics is automatically determined.

GraphNumberFormatUnitlessQuantities Controls the number formatting used for unitless graph statistics.

GraphNumDelimitedCurves Controls the maximum number of curves in a graph that will display delimited percentile information.

GraphNumHistogramBins Specifies the number of histogram bins to be used in the display of graphs.

GraphOutputColor Controls the default (RGB) color applied to the curves representing outputs in an @RISK graph.

GraphOutputScalingFactor Specifies a default scaling factor for a output distribution graph.

GraphOutputScalingIsAutomatic Indicates whether the default x-axis scaling of output distributions graphs is automatically determined.

GraphOutputScalingMaximum Specifies a default maximum value for a output distribution graph.

GraphOutputScalingMinimum Specifies a default minimum value for a output distribution graph.

GraphPreferredDistributionFormat Controls the preferred distribution display format for distribution graphs.

GraphRightDelimiter Controls the default value for a distribution graph's left delimiter percentile.

GraphSummaryTrendCenterline Controls the centerline statistic used for summery trend graphs.

GraphSummaryTrendCenterlineColor Controsl the control of the centerline for summary trend graphs.

GraphSummaryTrendFormattingIsAutomatic Controls whether summary trend graphs are formatted automatically.

GraphSummaryTrendInnerColor Controls the color of a summary trend graph's inner band.

Page 112: RISK Object Library - Palisade Corporation

GraphSummaryTrendInnerRange Controls the bounds of the inner band of a summary trend graph.

GraphSummaryTrendOuterColor Controls the color of a summary trend graph's outer band.

GraphSummaryTrendOuterRange Controls the bounds of the outer band of a summary trend graph.

GraphSuppressYAxis

GraphTitleDescription Specifies a default graph description to use, overriding the automatic title generated by @RISK.

GraphTitleMainText Specifies a default graph title to use, overriding the automatic title generated by @RISK.

GraphXAxisTickLabelOrientation Specifies how the x-axis tick labels appear on graphs.

GraphXAxisTitle

GraphYAxisTitle

InsertFunctionGraphWindowEnabled Controls if an @RISK graph window automatically is displayed when Excel's 'Insert Function' window is displayed.

InsertStaticValues Controls whether @RISK, by default, will put RiskStatic() property functions into new @RISK input distributions.

LibraryEnabled Controls whether the @RISK Library facility is enabled be default when @RISK is started.

MiniToolbarEnabled

ModelWindowColumns Controls the columns that will be displayed by default in the @RISK Model Window.

PolicyFileInUse Indicates whether the @RISK user has a policy file installed.

ProjectDisplayStandardGanttChart

ProjectManualRecalculation

ProjectProbGanttCalculateCriticalIndex

ProjectProbGanttCalculateStatistics

ProjectProbGanttFinishDatePercentile

Page 113: RISK Object Library - Palisade Corporation

ProjectProbGanttLocation

ProjectProbGanttStartDatePercentile

ProjectSimulationDateRange

ReportOverwriteExisting Controls whether newly generated reports in a workbook will replace already existing reports in that same workbook.

ReportPlacement Controls where @RISK's Excel reports will be placed, either in a new workbook or the active workbook.

ReportReuseNewWorkbook Controls whether only a single new Excel workbook will be created to hold reports.

ResultWindowColumns Controls the columns that will be displayed by default in the @RISK Results Window.

RISKOptimizerCrossoverRate Controls the default crossover rate for new optimization models.

RiskOptimizerEngine Controls the default optimization engine for new optimization models.

RISKOptimizerMutationRate Controls the default mutation rate for new optimization models.

RISKOptimizerPopulationSize Controls the default population size for new optimization models.

RISKOptimizerProgressMaxChange Controls the maximum change for new optimization models that use a progress based stopping condition.

RISKOptimizerProgressMaxChangeIsPercent Specifies if the maximum change for new optimization models that use a progress based stopping condition is a

percentage of the output value.

RISKOptimizerProgressStoppingCondition Controls if new optimization models will use, by default, a progress based stopping condition.

RISKOptimizerProgressTrialCount Controls the number of trials used by default for new optimization models that use a progress based stopping

condition.

RISKOptimizerStopOnErrors Controls if new optimization models will stop, by default, when any errors are calculated in output values.

RISKOptimizerTimeSpan Controls the amount of time allowed, by default, for new optimization models in the time span stopping condition.

RISKOptimizerTimeSpanStoppingCondition Controls if new optimization models will use, by default, a time span stopping condition.

RiskOptimizerTimeSpanUnit

Page 114: RISK Object Library - Palisade Corporation

RISKOptimizerTrialCount

RISKOptimizerTrialStoppingCondition Controls if new optimization models will use, by default, a maximum trial count stopping condition.

SaveLocation Controls where @RISK stores simulation results.

SensitivityNumDivisions

SensitivityPercentile

SensitivityPreferredMethod

SensitivitySpiderMaxNumLines

SensitivityStatistic

SensitivityTornadoMaxNumBars

ShowWelcomeScreenAtStartup Controls whether the @RISK "Welcome / What's New" windows is automatically displayed each time the

application starts.

SimSettingsAutomaticResultsDisplay Sets the default AutomaticResultsDisplay simulation settings for new models.

SimSettingsCollectDistributionSamples Sets the default CollectDistributionSamples simulation settings for new models.

SimSettingsConvergenceTestingEnabled Sets the default ConvergenceTestingEnabled simulation settings for new models.

SimSettingsLiveUpdate Sets the default LiveUpdate simulation settings for new models.

SimSettingsMinimizeExcel Sets the default MinimizeExcel simulation settings for new models.

SimSettingsNumIterations Sets the default NumIterations simulation settings for new models.

SimSettingsPauseOnOutputErrors Sets the default PauseOnOutputErrors simulation settings for new models.

SimSettingsSamplingType Sets the default SamplingType simulation settings for new models.

SimSettingsShowExcelRecalculations Sets the default ShowExcelRecalculations simulation settings for new models.

Page 115: RISK Object Library - Palisade Corporation

SimSettingsSmartSensitivityAnalysisEnabled Controls whether smart sensitivity analysis will is enabled.

SimSettingsStatisticFunctionUpdating Controls when @RISK statistic functions will be updated during a simulation.

SimSettingsStdRecalcBehavior Sets the default StdRecalcBehavior simulation settings for new models.

SimSettingsStdRecalcWithoutRiskStatic Sets the default StdRecalcWithoutRiskStatic simulation settings for new models.

SimSettingsStdRecalcWithoutRiskStaticPercentile Sets the default StdRecalcWithoutRiskStaticPercentile simulation settings for new models.

SimSettingsUseMultipleCPUs Controls whether @RISK will use multiple CPUs (if there is more than one CPU on the machine) to perform

simulations.

SwapPreviewChanges Controls what items are previewed when swapping in formulas.

SwapWithoutRiskStatic Controls what statistic is substituted when the user swaps out @RISK functions that do not contain RiskStatic()

property functions.

SwapWithoutRiskStaticPercentile Controls what percentile is substituted when the user swaps out @RISK functions that do not contain RiskStatic()

property functions.

TimeSeriesCenterline

TimeSeriesCenterlineColor

TimeSeriesCurrentSimulationColor

TimeSeriesHistoricalDataColor

TimeSeriesInnerColor

TimeSeriesInnerRange

TimeSeriesNumberOfDefaultDataPoints

TimeSeriesNumberOfPreviousPaths

TimeSeriesOrientation

TimeSeriesOuterColor

Page 116: RISK Object Library - Palisade Corporation

TimeSeriesOuterRange

TimeSeriesPreviousSimulationColor

TimeSeriesVerticalDelimiterColor

WindowDefaultSize Controls the default size of new @RISK windows.

WindowListDisplay Controls under what circumstances the @RISK Windows List will be displayed.

See Also

RiskApplicationSettings Overview

© Palisade Corporation. All Rights Reserved.

Page 117: RISK Object Library - Palisade Corporation

Description

Applies current Application Settings to open windows, graphs, and workbooks.

Syntax

Public Sub ApplyNow()

Remarks

Many application settings only affect new @RISK object (graphs, workbooks, windows, etc.) when they are first created. This property applies the current @RISK settings to already

existing open objects.

Example

[[New Example] (Visual Basic)]

'Change how percentiles are displayed by default in @RISK and apply the change to all open windows.

Public Sub ChangePercentileDisplay()

Risk.ApplicationSettings.CumulativeDescendingPercentiles = True

Risk.ApplicationSettings.ApplyNow

End Sub

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ApplyNow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 118: RISK Object Library - Palisade Corporation

Syntax

Public Function GetDetailedStatsWindowTargets( _

ByRef p_TargetArray() As Double _

) As Long

Parameters

p_TargetArray

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GetDetailedStatsWindowTargets Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 119: RISK Object Library - Palisade Corporation

Description

Returns one of the applicaton's scenario analysis defaults.

Syntax

Public Sub GetScenarioDefault( _

ByVal p_Index As Integer, _

ByRef p_LowerBound As Double, _

ByRef p_UpperBound As Double _

)

Parameters

p_Index

An integer value between 1 and 3, indicating which scenario default should be retreived.

p_LowerBound

This variable returns the lower bound of the specified scenario. The value is between 0 and 1.

p_UpperBound

This variable returns the upper bound of the specified scenario. The value is between 0 and 1.

Example

[Visual Basic]

'Displays the three default scenarios in message boxes:

Public Sub DisplayScenarioDefault()

Dim lowerBound As Double

Dim upperBound As Double

Dim i As Integer

For i = 1 To 3

Risk.ApplicationSettings.GetScenarioDefault i, lowerBound, upperBound

MsgBox "Scenario # " & i & " : " & lowerBound & " --> " & upperBound

GetScenarioDefault Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 120: RISK Object Library - Palisade Corporation

Next i

End Sub

See Also

RiskApplicationSettings Object | SetScenarioDefault Method

© Palisade Corporation. All Rights Reserved.

Page 121: RISK Object Library - Palisade Corporation

Description

Resets the @RISK Application Settings to their default state.

Syntax

Public Sub ResetToFactoryDefaults()

Remarks

This will reset all of the @RISK application settings to their internal "factory" defaults.

If a policy file is in use, this call will override the settings stored in the policy file.

See Also

RiskApplicationSettings Object | PolicyFileInUse Property

© Palisade Corporation. All Rights Reserved.

ResetToFactoryDefaults Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 122: RISK Object Library - Palisade Corporation

Syntax

Public Sub SetDetailedStatsWindowTargets( _

ByRef p_TargetArray() As Double _

)

Parameters

p_TargetArray

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SetDetailedStatsWindowTargets Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 123: RISK Object Library - Palisade Corporation

Description

Sets one of the applicaton's scenario analysis defaults.

Syntax

Public Sub SetScenarioDefault( _

ByVal p_Index As Integer, _

ByVal p_LowerBound As Double, _

ByVal p_UpperBound As Double _

)

Parameters

p_Index

An integer value between 1 and 3, indicating which scenario default should be set.

p_LowerBound

This variable sets the lower bound of the specified scenario. The value is between 0 and 1.

p_UpperBound

This variable sets the upper bound of the specified scenario. The value is between 0 and 1.

Remarks

Changes to this setting will not take effect until you call the ApplyNow method.

Example

[Visual Basic]

'Set the three default scenarios :

Public Sub SetScenarioDefaults()

Risk.ApplicationSettings.SetScenarioDefault 1, 0.1, 0.5

Risk.ApplicationSettings.SetScenarioDefault 2, 0.5, 0.75

Risk.ApplicationSettings.SetScenarioDefault 3, 0.75, 1

End Sub

SetScenarioDefault Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 124: RISK Object Library - Palisade Corporation

See Also

RiskApplicationSettings Object | GetScenarioDefault Method | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 125: RISK Object Library - Palisade Corporation

Description

Controls the default alternate parameterization for a specified distribution type.

Property type

Read-write property

Syntax (Visual Basic)

Public Property AltParamDefaults( _

ByVal p_DistributionType As Variant _

) As String

Parameters

p_DistributionType

The name of the distribution type, e.g. "Normal" or "Weibull".

Remarks

The format of the string must follow the syntax of the distribution type in question (in US/English format) with 'x's replacing the numeric values of the parameters (see the example below).

Example

[Visual Basic]

Public Sub SetAlternateParameterDefault()

Risk.ApplicationSettings.AltParamDefaults("Normal") = "RiskNormalAlt(10%,x,90%,x)"

Risk.ApplicationSettings.AltParamDefaults("Uniform") = "RiskUniformAlt(""Min"",x,90%,x)"

End Sub

See Also

RiskApplicationSettings Object

AltParamDefaults Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 126: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 127: RISK Object Library - Palisade Corporation

Description

Controls the (RGB) color to be used when @RISK automatically formats cells containing @RISK input distributions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CellFormattingInputColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property will only have effect if the CellFormattingStyle property is not set to RiskCellFormattingNone.

Changes to this setting will not take effect until you call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Set @RISK up to automatically color input cells green and output cells blue.

Public Sub SetCellFormatting()

With Risk.ApplicationSettings

.CellFormattingStyle = RiskCellFormattingBackgroundColor

.CellFormattingInputColor = vbGreen

.CellFormattingOutputColor = vbBlue

.ApplyNow

End With

End Sub

See Also

RiskApplicationSettings Object | CellFormattingStyle Property | CellFormattingOutputColor Property | ApplyNow Method

CellFormattingInputColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 128: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 129: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property CellFormattingOptimizerVariableColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

CellFormattingOptimizerVariableColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 130: RISK Object Library - Palisade Corporation

Description

Controls the (RGB) color to be used when @RISK automatically formats cells containing @RISK output functions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CellFormattingOutputColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property will only have effect if the CellFormattingStyle property is not set to RiskCellFormattingNone.

Changes to this setting will not take effect until you call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Set @RISK up to automatically color input cells green and output cells blue.

Public Sub SetCellFormatting()

With Risk.ApplicationSettings

.CellFormattingStyle = RiskCellFormattingBackgroundColor

.CellFormattingInputColor = vbGreen

.CellFormattingOutputColor = vbBlue

.ApplyNow

End With

End Sub

See Also

RiskApplicationSettings Object | CellFormattingStyle Property | CellFormattingInputColor Property | ApplyNow Method

CellFormattingOutputColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 131: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 132: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property CellFormattingStatisticColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

CellFormattingStatisticColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 133: RISK Object Library - Palisade Corporation

Description

Controls how @RISK will automatically format spreadsheet cells containing @RISK input or output functions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CellFormattingStyle() As RiskCellFormattingStyle

Remarks

The CellFormattingInputColor and CellFormattingOutputColor control the colors used in the cell formatting.

Changes to this setting will not take effect until you call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Set @RISK up to automatically color input cells green and output cells blue.

Public Sub SetCellFormatting()

With Risk.ApplicationSettings

.CellFormattingStyle = RiskCellFormattingBackgroundColor

.CellFormattingInputColor = vbGreen

.CellFormattingOutputColor = vbBlue

.ApplyNow

End With

End Sub

See Also

RiskApplicationSettings Object | CellFormattingInputColor Property | CellFormattingOutputColor Property | ApplyNow Method | RiskCellFormattingStyle Enumeration

CellFormattingStyle Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 134: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 135: RISK Object Library - Palisade Corporation

Description

Sets whether @RISK will display percentiles in cumulative descending format.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CumulativeDescendingPercentiles() As Boolean

Remarks

This property only affects the display of percentiles in the @RISK interface. All methods and properties will continue to return cumulative ascending percentiles.

This settings will affect all new windows created by @RISK. After changing this setting, you can apply it to already open windows using the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Change how percentiles are displayed by default in @RISK and apply the change to all open windows.

Public Sub ChangePercentileDisplay()

Risk.ApplicationSettings.CumulativeDescendingPercentiles = True

Risk.ApplicationSettings.ApplyNow

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

CumulativeDescendingPercentiles Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 136: RISK Object Library - Palisade Corporation

Description

Controls whether a shift factor entry will be displayed by default in the define distribution window, even if a shift factor is not present in the distribution being edited.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DistributionEntryDisplayShiftFactor() As Boolean

See Also

RiskApplicationSettings Object | DistributionEntryDisplayStaticValue Property | DistributionEntryDisplayTruncationLimits Property

© Palisade Corporation. All Rights Reserved.

DistributionEntryDisplayShiftFactor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 137: RISK Object Library - Palisade Corporation

Description

Controls whether a static value entry will be displayed by default in the define distribution window, even if a static value is not present in the distribution being edited.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DistributionEntryDisplayStaticValue() As Boolean

See Also

RiskApplicationSettings Object | DistributionEntryDisplayShiftFactor Property | DistributionEntryDisplayTruncationLimits Property

© Palisade Corporation. All Rights Reserved.

DistributionEntryDisplayStaticValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 138: RISK Object Library - Palisade Corporation

Description

Controls whether truncation limits entries will be displayed by default in the define distribution window, even if a truncation limits are not present in the distribution being edited.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DistributionEntryDisplayTruncationLimits() As RiskDistributionTruncation

Example

[Visual Basic]

'Make the distribution entry panel show all the options by default:

Public Sub SetDistributionEntryOptions()

Risk.ApplicationSettings.DistributionEntryDisplayShiftFactor = True

Risk.ApplicationSettings.DistributionEntryDisplayTruncationLimits = True

Risk.ApplicationSettings.DistributionEntryDisplayStaticValue = True

End Sub

See Also

RiskApplicationSettings Object | DistributionEntryDisplayShiftFactor Property | DistributionEntryDisplayStaticValue Property

© Palisade Corporation. All Rights Reserved.

DistributionEntryDisplayTruncationLimits Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 139: RISK Object Library - Palisade Corporation

Description

Controls the centerline statistic used for box-plots.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotCenterline() As RiskSummaryGraphCenterlineStatistic

Remarks

This property only has effect if the GraphBoxPlotFormattingIsAutomatic Property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

RiskApplicationSettings Object | GraphBoxPlotColor Property | GraphBoxPlotFormattingIsAutomatic Property | GraphBoxPlotInnerRange Property | GraphBoxPlotOuterRange Property

GraphBoxPlotCenterline Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 140: RISK Object Library - Palisade Corporation

| GraphBoxPlotShowCenterlineLabels Property

© Palisade Corporation. All Rights Reserved.

Page 141: RISK Object Library - Palisade Corporation

Description

Controls the color used for box-plot graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property only has effect if the GraphBoxPlotFormattingIsAutomatic Property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

GraphBoxPlotColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 142: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphBoxPlotCenterline Property | GraphBoxPlotFormattingIsAutomatic Property | GraphBoxPlotInnerRange Property | GraphBoxPlotOuterRange

Property | GraphBoxPlotShowCenterlineLabels Property

© Palisade Corporation. All Rights Reserved.

Page 143: RISK Object Library - Palisade Corporation

Description

Controls whether box-plots are formatted automatically.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotFormattingIsAutomatic() As Boolean

Remarks

If this property is FALSE, the other GraphBoxPlot properties are use to determine the formatting of new box-plots.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

RiskApplicationSettings Object | GraphBoxPlotCenterline Property | GraphBoxPlotColor Property | GraphBoxPlotInnerRange Property | GraphBoxPlotOuterRange Property

GraphBoxPlotFormattingIsAutomatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 144: RISK Object Library - Palisade Corporation

| GraphBoxPlotShowCenterlineLabels Property

© Palisade Corporation. All Rights Reserved.

Page 145: RISK Object Library - Palisade Corporation

Description

Controls the bounds of the box in a box-plot.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotInnerRange() As RiskSummaryGraphRange

Remarks

This property only has effect if the GraphBoxPlotFormattingIsAutomatic Property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

RiskApplicationSettings Object | GraphBoxPlotCenterline Property | GraphBoxPlotColor Property | GraphBoxPlotFormattingIsAutomatic Property | GraphBoxPlotOuterRange Property

GraphBoxPlotInnerRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 146: RISK Object Library - Palisade Corporation

| GraphBoxPlotOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 147: RISK Object Library - Palisade Corporation

Description

Controls the bounds of the whiskers in a box-plot.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotOuterRange() As RiskSummaryGraphRange

Remarks

This property only has effect if the GraphBoxPlotFormattingIsAutomatic Property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

RiskApplicationSettings Object | GraphBoxPlotCenterline Property | GraphBoxPlotColor Property | GraphBoxPlotFormattingIsAutomatic Property | GraphBoxPlotInnerRange Property

GraphBoxPlotOuterRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 148: RISK Object Library - Palisade Corporation

| GraphBoxPlotShowCenterlineLabels Property

© Palisade Corporation. All Rights Reserved.

Page 149: RISK Object Library - Palisade Corporation

Description

Controls whether the centerline value are displayed on a box-plot.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphBoxPlotShowCenterlineLabels() As Boolean

Remarks

This property only has effect if the GraphBoxPlotFormattingIsAutomatic Property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Box Plot Options:

Public Sub ChangeDefaultBoxPlotOptions()

With Risk.ApplicationSettings

.GraphBoxPlotFormattingIsAutomatic = False

.GraphBoxPlotCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphBoxPlotInnerRange = RiskSummaryGraphRangeP25P75

.GraphBoxPlotOuterRange = RiskSummaryGraphRangeP10P90

.GraphBoxPlotShowCenterlineLabels = True

.GraphBoxPlotColor = vbGreen

End With

End Sub

See Also

RiskApplicationSettings Object | GraphBoxPlotCenterline Property | GraphBoxPlotColor Property | GraphBoxPlotFormattingIsAutomatic Property | GraphBoxPlotInnerRange Property

GraphBoxPlotShowCenterlineLabels Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 150: RISK Object Library - Palisade Corporation

| GraphBoxPlotOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 151: RISK Object Library - Palisade Corporation

Description

Controls if a cumulative overlay curve is automatically added to distribution graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphDistributionSecondaryAxisOverlay() As RiskDistributionSecondaryAxisOverlay

Remarks

This graph only applies to distribution graphs.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object | ApplyNow Method | GraphPreferredDistributionFormat Property

© Palisade Corporation. All Rights Reserved.

GraphDistributionSecondaryAxisOverlay Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 152: RISK Object Library - Palisade Corporation

GraphInputColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 153: RISK Object Library - Palisade Corporation

Description

Controls the default (RGB) color applied to the curves representing inputs in an @RISK graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphInputColor() As Long

Remarks

This property does not apply to all @RISK graph types.

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply this color to all open @RISK graph windows.

Example

[[New Example] (Visual Basic)]

'Set @RISK to automatically make graphs on outputs green and graphs of inputs yellow

Public Sub SetGraphColors()

With Risk.ApplicationSettings

.GraphOutputColor = vbGreen

.GraphInputColor = vbYellow

End With

End Sub

See Also

RiskApplicationSettings Object | GraphOutputColor Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 154: RISK Object Library - Palisade Corporation

Description

Controls the default value for a distribution graph's left delimiter percentile.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphLeftDelimiter() As Double

Remarks

This property only applies to distribution graphs.

This is a percentile value which must be between 0 and 1.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply the change to all open @RISK graph windows.

Example

[[New Example] (Visual Basic)]

'Set the default graph delimiter to be at 2.5% and 97.5% and show delimited values for up to 3 curves.

Public Sub SetGraphDelimiterDefaults()

With Risk.ApplicationSettings

.GraphLeftDelimiter = 0.025

.GraphRightDelimiter = 0.975

.GraphNumDelimitedCurves = 3

End With

End Sub

See Also

RiskApplicationSettings Object | GraphRightDelimiter Property | GraphNumDelimitedCurves Property | ApplyNow Method

GraphLeftDelimiter Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 155: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 156: RISK Object Library - Palisade Corporation

Description

Controls what items appear by default on a graph's legend.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphLegendTableDefinition() As String

Remarks

This property does not apply to all @RISK graph types.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Set this property to the string "{Default}" to use the default settings of the application.

The detailed format of this string has not yet been made public for automation control.

See Also

RiskApplicationSettings Object | GraphMarkerDefinition Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphLegendTableDefinition Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 157: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphLegendView() As RiskGraphLegendView

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphLegendView Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 158: RISK Object Library - Palisade Corporation

Property type

Read-only property

Syntax (Visual Basic)

Public Property GraphLegendViewString() As String

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphLegendViewString Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 159: RISK Object Library - Palisade Corporation

Description

Controls what items appear by default as marked items on a graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphMarkerDefinition() As String

Remarks

This property does not apply to all @RISK graph types.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Set this property to the string "{Default}" to use the default settings of the application.

The detailed format of this string has not yet been made public for automation control.

See Also

RiskApplicationSettings Object | GraphLegendTableDefinition Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphMarkerDefinition Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 160: RISK Object Library - Palisade Corporation

Description

Controls the number formatting used for graph statistics that have scaled units.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphNumberFormatQuantitiesWithUnits() As String

Remarks

This property does not apply to all @RISK graph types.

This property only has effect when the GraphNumberFormattingIsAutomatic property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property is applied to statistics with units (such as mean, standard deviation, etc.) Use the GraphNumberFormatUnitlessQuantities property to specify the number formatting used for

statistics that do not have units (such as skewness, kurtosis, etc.)

This format of this property string may be set to:

A blank string - indicating the "General" number format.

A two character string in the format "C#" where # is a number between 0 and 9. This is a currency format with the specified number of digits trailing the decimal.

A two character string in the format "F#" where # is a number between 0 and 9. This is a fixed format with the specified number of digits trailing the decimal.

See Also

RiskApplicationSettings Object | GraphNumberFormattingIsAutomatic Property | GraphNumberFormatUnitlessQuantities Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphNumberFormatQuantitiesWithUnits Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 161: RISK Object Library - Palisade Corporation

Description

Controls whether the number formatting used in graph statistics is automatically determined.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphNumberFormattingIsAutomatic() As Boolean

Remarks

This property does not apply to all @RISK graph types.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

When this property is False, the GraphNumberFomatQuantitiesWithUnits and GraphNumberFormatUnitlessQuantities property specify the number formatting to use.

See Also

RiskApplicationSettings Object | GraphNumberFormatQuantitiesWithUnits Property | GraphNumberFormatUnitlessQuantities Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphNumberFormattingIsAutomatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 162: RISK Object Library - Palisade Corporation

Description

Controls the number formatting used for unitless graph statistics.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphNumberFormatUnitlessQuantities() As String

Remarks

This property does not apply to all @RISK graph types.

This property only has effect when the GraphNumberFormattingIsAutomatic property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property is applied to 'unitless' statistics (such as skewness, kurtosis, etc.) Use the GraphNumberFormatQuantitiesWithUnits property to specify the number formatting used for

statistics with units.

This format of this property string may be set to:

A blank string - indicating the "General" number format.

A two character string in the format "F#" where # is a number between 0 and 9. This is a fixed format with the specified number of digits trailing the decimal.

See Also

RiskApplicationSettings Object | GraphNumberFormattingIsAutomatic Property | GraphNumberFormatQuantitiesWithUnits Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphNumberFormatUnitlessQuantities Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 163: RISK Object Library - Palisade Corporation

Description

Controls the maximum number of curves in a graph that will display delimited percentile information.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphNumDelimitedCurves() As Integer

Remarks

This property only applies to distribution graphs.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply the change to all open @RISK graph windows.

Example

[[New Example] (Visual Basic)]

'Set the default graph delimiter to be at 2.5% and 97.5% and show delimited values for up to 3 curves.

Public Sub SetGraphDelimiterDefaults()

With Risk.ApplicationSettings

.GraphLeftDelimiter = 0.025

.GraphRightDelimiter = 0.975

.GraphNumDelimitedCurves = 3

End With

End Sub

See Also

RiskApplicationSettings Object | GraphLeftDelimiter Property | GraphRightDelimiter Property | ApplyNow Method

GraphNumDelimitedCurves Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 164: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 165: RISK Object Library - Palisade Corporation

Description

Specifies the number of histogram bins to be used in the display of graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphNumHistogramBins() As Integer

Remarks

This property does not apply to all @RISK graph types.

The special value RiskAutoNumHistogramBins can be used to have @RISK automatically determine this value for you.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply the change to all open @RISK graph windows.

See Also

RiskApplicationSettings Object | RiskAutoNumHistogramBins Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

GraphNumHistogramBins Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 166: RISK Object Library - Palisade Corporation

GraphOutputColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 167: RISK Object Library - Palisade Corporation

Description

Controls the default (RGB) color applied to the curves representing outputs in an @RISK graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphOutputColor() As Long

Remarks

This property does not apply to all @RISK graph types.

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply this color to all open @RISK graph windows.

Example

[[New Example] (Visual Basic)]

'Set @RISK to automatically make graphs on outputs green and graphs of inputs yellow

Public Sub SetGraphColors()

With Risk.ApplicationSettings

.GraphOutputColor = vbGreen

.GraphInputColor = vbYellow

End With

End Sub

See Also

RiskApplicationSettings Object | GraphInputColor Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 168: RISK Object Library - Palisade Corporation

Description

Specifies a default scaling factor for a output distribution graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphOutputScalingFactor() As RiskScalingFactor

Remarks

This property on applies to distribution graphs of outputs.

This property on has effect if the GraphOutputScalingIsAutomatic property is False.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Change Default Graph Scaling

Public Sub ChangeDefaultGraphScaling()

With Risk.ApplicationSettings

.GraphOutputScalingIsAutomatic = False

.GraphOutputScalingMinimum = 1000

.GraphOutputScalingMaximum = 5000

.GraphOutputScalingFactor = RiskScaleByThousands

End With

End Sub

See Also

RiskApplicationSettings Object | GraphOutputScalingIsAutomatic Property | GraphOutputScalingMinimum Property | GraphOutputScalingMaximum Property | ApplyNow Method

GraphOutputScalingFactor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 169: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 170: RISK Object Library - Palisade Corporation

Description

Indicates whether the default x-axis scaling of output distributions graphs is automatically determined.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphOutputScalingIsAutomatic() As Boolean

Remarks

This property on applies to distribution graphs of outputs.

If this property is set to False, the GraphOutputScalingMinimum, GraphOutputScalingMaximum, and GraphOutputScalingFactor properties will control the default scaling applies to new

distribution graphs.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Change Default Graph Scaling

Public Sub ChangeDefaultGraphScaling()

With Risk.ApplicationSettings

.GraphOutputScalingIsAutomatic = False

.GraphOutputScalingMinimum = 1000

.GraphOutputScalingMaximum = 5000

.GraphOutputScalingFactor = RiskScaleByThousands

End With

End Sub

See Also

GraphOutputScalingIsAutomatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 171: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphOutputScalingIsAutomatic Property | GraphOutputScalingMinimum Property | GraphOutputScalingMaximum Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 172: RISK Object Library - Palisade Corporation

Description

Specifies a default maximum value for a output distribution graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphOutputScalingMaximum() As Double

Remarks

This property on applies to distribution graphs of outputs.

This property on has effect if the GraphOutputScalingIsAutomatic property is False.

The value specified in this property is NOT scaled by the value in the GraphOutputScalingFactor property.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Change Default Graph Scaling

Public Sub ChangeDefaultGraphScaling()

With Risk.ApplicationSettings

.GraphOutputScalingIsAutomatic = False

.GraphOutputScalingMinimum = 1000

.GraphOutputScalingMaximum = 5000

.GraphOutputScalingFactor = RiskScaleByThousands

End With

End Sub

See Also

GraphOutputScalingMaximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 173: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphOutputScalingIsAutomatic Property | GraphOutputScalingMinimum Property | GraphOutputScalingFactor Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 174: RISK Object Library - Palisade Corporation

Description

Specifies a default minimum value for a output distribution graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphOutputScalingMinimum() As Double

Remarks

This property on applies to distribution graphs of outputs.

This property on has effect if the GraphOutputScalingIsAutomatic property is False.

The value specified in this property is NOT scaled by the value in the GraphOutputScalingFactor property.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[[New Example] (Visual Basic)]

'Change Default Graph Scaling

Public Sub ChangeDefaultGraphScaling()

With Risk.ApplicationSettings

.GraphOutputScalingIsAutomatic = False

.GraphOutputScalingMinimum = 1000

.GraphOutputScalingMaximum = 5000

.GraphOutputScalingFactor = RiskScaleByThousands

End With

End Sub

See Also

GraphOutputScalingMinimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 175: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphOutputScalingIsAutomatic Property | GraphOutputScalingMaximum Property | GraphOutputScalingFactor Property | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

Page 176: RISK Object Library - Palisade Corporation

Description

Controls the preferred distribution display format for distribution graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphPreferredDistributionFormat() As RiskDistributionDisplayFormat

Remarks

This graph only applies to distribution graphs.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object | GraphPreferredTornadoFormat Property | ApplyNow Method | RiskDistributionDisplayFormat Enumeration

© Palisade Corporation. All Rights Reserved.

GraphPreferredDistributionFormat Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 177: RISK Object Library - Palisade Corporation

Description

Controls the default value for a distribution graph's left delimiter percentile.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphRightDelimiter() As Double

Remarks

This property only applies to distribution graphs.

This is a percentile value which must be between 0 and 1.

Changes to this setting will affect new graphs created in the @RISK interface. Calling the ApplyNow method will apply the change to all open @RISK graph windows.

Example

[[New Example] (Visual Basic)]

'Set the default graph delimiter to be at 2.5% and 97.5% and show delimited values for up to 3 curves.

Public Sub SetGraphDelimiterDefaults()

With Risk.ApplicationSettings

.GraphLeftDelimiter = 0.025

.GraphRightDelimiter = 0.975

.GraphNumDelimitedCurves = 3

End With

End Sub

See Also

RiskApplicationSettings Object | GraphLeftDelimiter Property | GraphNumDelimitedCurves Property | ApplyNow Method

GraphRightDelimiter Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 178: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 179: RISK Object Library - Palisade Corporation

Description

Controls the centerline statistic used for summery trend graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendCenterline() As RiskSummaryGraphCenterlineStatistic

Remarks

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

See Also

GraphSummaryTrendCenterline Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 180: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendFormattingIsAutomatic Property | GraphSummaryTrendInnerColor Property

| GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterColor Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 181: RISK Object Library - Palisade Corporation

Description

Controsl the control of the centerline for summary trend graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendCenterlineColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

GraphSummaryTrendCenterlineColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 182: RISK Object Library - Palisade Corporation

See Also

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendFormattingIsAutomatic Property | GraphSummaryTrendInnerColor Property

| GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterColor Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 183: RISK Object Library - Palisade Corporation

Description

Controls whether summary trend graphs are formatted automatically.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendFormattingIsAutomatic() As Boolean

Remarks

If this property is FALSE, the other GraphSummaryTrend properties are use to determine the formatting of new summary trend graphs.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

See Also

GraphSummaryTrendFormattingIsAutomatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 184: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendInnerColor Property

| GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterColor Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 185: RISK Object Library - Palisade Corporation

Description

Controls the color of a summary trend graph's inner band.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendInnerColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

GraphSummaryTrendInnerColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 186: RISK Object Library - Palisade Corporation

See Also

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendFormattingIsAutomatic Property

| GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterColor Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 187: RISK Object Library - Palisade Corporation

Description

Controls the bounds of the inner band of a summary trend graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendInnerRange() As RiskSummaryGraphRange

Remarks

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

See Also

GraphSummaryTrendInnerRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 188: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendFormattingIsAutomatic Property

| GraphSummaryTrendInnerColor Property | GraphSummaryTrendOuterColor Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 189: RISK Object Library - Palisade Corporation

Description

Controls the color of a summary trend graph's outer band.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendOuterColor() As Long

Remarks

This is an RGB color. You can use either build in VB color constants (e.g. vbRed, vbBlue, etc.) or the RGB function to specify these colors.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

GraphSummaryTrendOuterColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 190: RISK Object Library - Palisade Corporation

See Also

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendFormattingIsAutomatic Property

| GraphSummaryTrendInnerColor Property | GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterRange Property

© Palisade Corporation. All Rights Reserved.

Page 191: RISK Object Library - Palisade Corporation

Description

Controls the bounds of the outer band of a summary trend graph.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSummaryTrendOuterRange() As RiskSummaryGraphRange

Remarks

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

This property only has effect if the GraphSummaryTrendFormattingIsAutomatic Property is False.

Example

[Visual Basic]

'Change Default Summary Trend Graph Options:

Public Sub ChangeDefaultSummaryTrendGraphOptions()

With Risk.ApplicationSettings

.GraphSummaryTrendFormattingIsAutomatic = False

.GraphSummaryTrendCenterline = RiskSummaryGraphCenterlineStatisticMedian

.GraphSummaryTrendInnerRange = RiskSummaryGraphRangeP25P75

.GraphSummaryTrendOuterRange = RiskSummaryGraphRangeP1P99

.GraphSummaryTrendCenterlineColor = vbRed

.GraphSummaryTrendOuterColor = vbBlue

.GraphSummaryTrendInnerColor = vbGreen

End With

End Sub

See Also

GraphSummaryTrendOuterRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 192: RISK Object Library - Palisade Corporation

RiskApplicationSettings Object | GraphSummaryTrendCenterline Property | GraphSummaryTrendCenterlineColor Property | GraphSummaryTrendFormattingIsAutomatic Property

| GraphSummaryTrendInnerColor Property | GraphSummaryTrendInnerRange Property | GraphSummaryTrendOuterColor Property

© Palisade Corporation. All Rights Reserved.

Page 193: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphSuppressYAxis() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphSuppressYAxis Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 194: RISK Object Library - Palisade Corporation

Description

Specifies a default graph description to use, overriding the automatic title generated by @RISK.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphTitleDescription() As String

Remarks

This property does not apply to all @RISK graph types.

Use the special value of RiskAutomaticText to put the control of the description text back to @RISK's discretion.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object | GraphTitleMainText Property | ApplyNow Method | RiskAutomaticText Property

© Palisade Corporation. All Rights Reserved.

GraphTitleDescription Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 195: RISK Object Library - Palisade Corporation

Description

Specifies a default graph title to use, overriding the automatic title generated by @RISK.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphTitleMainText() As String

Remarks

This property does not apply to all @RISK graph types.

Use the special value of RiskAutomaticText to put the control of the title text back to @RISK's discretion.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object | GraphTitleDescription Property | ApplyNow Method | RiskAutomaticText Property

© Palisade Corporation. All Rights Reserved.

GraphTitleMainText Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 196: RISK Object Library - Palisade Corporation

Description

Specifies how the x-axis tick labels appear on graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphXAxisTickLabelOrientation() As RiskTextOrientation

Remarks

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphXAxisTickLabelOrientation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 197: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphXAxisTitle() As String

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphXAxisTitle Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 198: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphYAxisTitle() As String

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

GraphYAxisTitle Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 199: RISK Object Library - Palisade Corporation

Description

Controls if an @RISK graph window automatically is displayed when Excel's 'Insert Function' window is displayed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property InsertFunctionGraphWindowEnabled() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

InsertFunctionGraphWindowEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 200: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK, by default, will put RiskStatic() property functions into new @RISK input distributions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property InsertStaticValues() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

InsertStaticValues Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 201: RISK Object Library - Palisade Corporation

Description

Controls whether the @RISK Library facility is enabled be default when @RISK is started.

Property type

Read-write property

Syntax (Visual Basic)

Public Property LibraryEnabled() As Boolean

Remarks

The @RISK Library is not available in the Standard edition of @RISK.

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

LibraryEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 202: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property MiniToolbarEnabled() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

MiniToolbarEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 203: RISK Object Library - Palisade Corporation

Description

Controls the columns that will be displayed by default in the @RISK Model Window.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ModelWindowColumns() As String

Remarks

Set this property to the string "{Default}" to use the default settings of the application.

The detailed format of this string has not yet been made public for automation control.

See Also

RiskApplicationSettings Object | ResultWindowColumns Property

© Palisade Corporation. All Rights Reserved.

ModelWindowColumns Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 204: RISK Object Library - Palisade Corporation

Description

Indicates whether the @RISK user has a policy file installed.

Property type

Read-only property

Syntax (Visual Basic)

Public Property PolicyFileInUse() As Boolean

Remarks

A policy file specifies a set of application for an @RISK user. If a system administrator has set up an @RISK policy file, the user will not be able to modify their application settings

manually. However, the settings can still be changed via automation code. In this case, however, any changes made to the application settings will only remain in effect until @RISK

closes.

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

PolicyFileInUse Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 205: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectDisplayStandardGanttChart() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectDisplayStandardGanttChart Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 206: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectManualRecalculation() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectManualRecalculation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 207: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectProbGanttCalculateCriticalIndex() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectProbGanttCalculateCriticalIndex Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 208: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectProbGanttCalculateStatistics() As Boolean

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectProbGanttCalculateStatistics Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 209: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectProbGanttFinishDatePercentile() As Double

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectProbGanttFinishDatePercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 210: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectProbGanttLocation() As RiskGanttLocation

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectProbGanttLocation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 211: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectProbGanttStartDatePercentile() As Double

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectProbGanttStartDatePercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 212: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectSimulationDateRange() As RiskProjectSimulationDateRange

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ProjectSimulationDateRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 213: RISK Object Library - Palisade Corporation

Description

Controls whether newly generated reports in a workbook will replace already existing reports in that same workbook.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportOverwriteExisting() As Boolean

Remarks

This property only has effect if the ReportPlacement property is RiskActiveWorkbook or if the ReportPlacement property is RiskNewWorkbook and the ReportReuseNewWorkbook

property is True.

Example

[[New Example] (Visual Basic)]

'Generate all the output quick reports in the active Excel workbook, replacing any existing reports.

Public Sub GenerateQuickReportsInActiveWorkbook()

With Risk.ApplicationSettings

.ReportPlacement = RiskActiveWorkbook

.ReportOverwriteExisting = True

End With

Risk.GenerateExcelReports RiskSimulationReportQuick

End Sub

See Also

RiskApplicationSettings Object | GenerateExcelReports Method | ReportPlacement Property | ReportReuseNewWorkbook Property

ReportOverwriteExisting Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 214: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 215: RISK Object Library - Palisade Corporation

Description

Controls where @RISK's Excel reports will be placed, either in a new workbook or the active workbook.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportPlacement() As RiskReportPlacement

Remarks

If this property is set to RiskNewWorkbook, reports that are generated will be placed into a newly created Excel workbook. However, if the ReportReuseNewWorkbook property is set to

True, the new workbook will be generated only the first time reports are generated. Sebsequent reports will be placed in the workbook that was previously created.

If this property is set to RiskActiveWorkbook, reports that are generated will be placed in the currently active Excel workbook.

If the ReportReuseNewWorkbook property is TRUE, the reports created will replace any existing reports in the destination workbook.

Example

[[New Example] (Visual Basic)]

'Generate all the output quick reports in the active Excel workbook, replacing any existing reports.

Public Sub GenerateQuickReportsInActiveWorkbook()

With Risk.ApplicationSettings

.ReportPlacement = RiskActiveWorkbook

.ReportOverwriteExisting = True

End With

Risk.GenerateExcelReports RiskSimulationReportQuick

End Sub

See Also

RiskApplicationSettings Object | GenerateExcelReports Method | ReportReuseNewWorkbook Property | ReportOverwriteExisting Property | RiskReportPlacement Enumeration

ReportPlacement Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 216: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 217: RISK Object Library - Palisade Corporation

Description

Controls whether only a single new Excel workbook will be created to hold reports.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportReuseNewWorkbook() As Boolean

Remarks

This property only has effect if the ReportPlacement property is set to RiskNewWorkbook, in which case a new Excel workbook will be created only the first time reports are generated. All

subsequent reports will then be put into the workbook originally created.

This can be useful to merge reports together from multiple simulations.

Example

[[New Example] (Visual Basic)]

'Run two different simulations, and generate an output summary for each of them, making sure to place all the

'reports in the same (new) workbook.

Public Sub GenerateReportsInSingleWorkbook()

With Risk.ApplicationSettings

.ReportPlacement = RiskNewWorkbook

.ReportReuseNewWorkbook = True

.ReportOverwriteExisting = False

End With

Risk.Simulation.Start

Risk.GenerateExcelReports RiskSimulationReportOutputResultsSummary

ReportReuseNewWorkbook Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 218: RISK Object Library - Palisade Corporation

Risk.Simulation.Start

Risk.GenerateExcelReports RiskSimulationReportOutputResultsSummary

End Sub

See Also

RiskApplicationSettings Object | GenerateExcelReports Method | ReportPlacement Property | ReportOverwriteExisting Property

© Palisade Corporation. All Rights Reserved.

Page 219: RISK Object Library - Palisade Corporation

Description

Controls the columns that will be displayed by default in the @RISK Results Window.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ResultWindowColumns() As String

Remarks

Set this property to the string "{Default}" to use the default settings of the application.

The detailed format of this string has not yet been made public for automation control.

See Also

RiskApplicationSettings Object | ModelWindowColumns Property

© Palisade Corporation. All Rights Reserved.

ResultWindowColumns Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 220: RISK Object Library - Palisade Corporation

Description

Controls the default crossover rate for new optimization models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerCrossoverRate() As Double

See Also

RiskApplicationSettings Object | Optimizer Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerCrossoverRate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 221: RISK Object Library - Palisade Corporation

Description

Controls the default optimization engine for new optimization models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RiskOptimizerEngine() As RiskOptimizerEngine

See Also

RiskApplicationSettings Object | Optimizer Property

© Palisade Corporation. All Rights Reserved.

RiskOptimizerEngine Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 222: RISK Object Library - Palisade Corporation

Description

Controls the default mutation rate for new optimization models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerMutationRate() As Double

See Also

RiskApplicationSettings Object | Optimizer Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerMutationRate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 223: RISK Object Library - Palisade Corporation

Description

Controls the default population size for new optimization models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerPopulationSize() As Long

See Also

RiskApplicationSettings Object | Optimizer Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerPopulationSize Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 224: RISK Object Library - Palisade Corporation

Description

Controls the maximum change for new optimization models that use a progress based stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerProgressMaxChange() As Double

Remarks

This setting only applies if the RISKOptimizerProgressStoppingCondition Property is True.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerProgressMaxChangeIsPercent Property | RISKOptimizerProgressStoppingCondition Property

| RISKOptimizerProgressTrialCount Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerProgressMaxChange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 225: RISK Object Library - Palisade Corporation

Description

Specifies if the maximum change for new optimization models that use a progress based stopping condition is a percentage of the output value.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerProgressMaxChangeIsPercent() As Boolean

Remarks

This setting only applies if the RISKOptimizerProgressStoppingCondition Property is True.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerProgressMaxChange Property | RISKOptimizerProgressStoppingCondition Property

| RISKOptimizerProgressTrialCount Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerProgressMaxChangeIsPercent Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 226: RISK Object Library - Palisade Corporation

Description

Controls if new optimization models will use, by default, a progress based stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerProgressStoppingCondition() As Boolean

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerProgressMaxChange Property | RISKOptimizerProgressMaxChangeIsPercent Property

| RISKOptimizerProgressTrialCount Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerProgressStoppingCondition Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 227: RISK Object Library - Palisade Corporation

Description

Controls the number of trials used by default for new optimization models that use a progress based stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerProgressTrialCount() As Long

Remarks

This setting only applies if the RISKOptimizerProgressStoppingCondition Property is True.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerProgressMaxChange Property | RISKOptimizerProgressMaxChangeIsPercent Property

| RISKOptimizerProgressStoppingCondition Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerProgressTrialCount Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 228: RISK Object Library - Palisade Corporation

Description

Controls if new optimization models will stop, by default, when any errors are calculated in output values.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerStopOnErrors() As Boolean

See Also

RiskApplicationSettings Object | Optimizer Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerStopOnErrors Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 229: RISK Object Library - Palisade Corporation

Description

Controls the amount of time allowed, by default, for new optimization models in the time span stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerTimeSpan() As Double

Remarks

This setting only applies if the RISKOptimizerTimeSpanStoppingCondition Property is True.

The RISKOptimizerTimeSpanUnit Property determines the magnitude of each unit.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerTimeSpanStoppingCondition Property | RISKOptimizerTimeSpanUnit Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerTimeSpan Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 230: RISK Object Library - Palisade Corporation

Description

Controls if new optimization models will use, by default, a time span stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerTimeSpanStoppingCondition() As Boolean

Remarks

The time span is specified using the RISKOptimizerTimeSpan Property and RISKOptimizerTimeSpanUnit Property.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerTimeSpan Property | RISKOptimizerTimeSpanUnit Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerTimeSpanStoppingCondition Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 231: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property RiskOptimizerTimeSpanUnit() As RiskOptimizerTimeSpanUnit

Remarks

This setting only applies if the RISKOptimizerTimeSpanStoppingCondition Property is True.

The RISKOptimizerTimeSpan Property controls the number of units in the time span.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerTimeSpan Property | RISKOptimizerTimeSpanStoppingCondition Property

© Palisade Corporation. All Rights Reserved.

RiskOptimizerTimeSpanUnit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 232: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerTrialCount() As Long

Remarks

This setting only applies if the RISKOptimizerTrialStoppingCondition Property is True.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerTrialStoppingCondition Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerTrialCount Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 233: RISK Object Library - Palisade Corporation

Description

Controls if new optimization models will use, by default, a maximum trial count stopping condition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RISKOptimizerTrialStoppingCondition() As Boolean

Remarks

The number of trial is specified in the RISKOptimizerTrialCount Property.

See Also

RiskApplicationSettings Object | Optimizer Property | RISKOptimizerTrialCount Property

© Palisade Corporation. All Rights Reserved.

RISKOptimizerTrialStoppingCondition Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 234: RISK Object Library - Palisade Corporation

Description

Controls where @RISK stores simulation results.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SaveLocation() As RiskResultsStorageLocation

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SaveLocation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 235: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivityNumDivisions() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivityNumDivisions Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 236: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivityPercentile() As Double

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivityPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 237: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivityPreferredMethod() As RiskTornadoDisplayFormat

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivityPreferredMethod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 238: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivitySpiderMaxNumLines() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivitySpiderMaxNumLines Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 239: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivityStatistic() As RiskStatisticType

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivityStatistic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 240: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property SensitivityTornadoMaxNumBars() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SensitivityTornadoMaxNumBars Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 241: RISK Object Library - Palisade Corporation

Description

Controls whether the @RISK "Welcome / What's New" windows is automatically displayed each time the application starts.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ShowWelcomeScreenAtStartup() As Boolean

Example

[[New Example] (Visual Basic)]

'Turn off @RISK's welcome screen.

Public Sub TurnOffWelcomeScreen()

Risk.ApplicationSettings.ShowWelcomeScreenAtStartup = False

End Sub

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

ShowWelcomeScreenAtStartup Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 242: RISK Object Library - Palisade Corporation

Description

Sets the default AutomaticResultsDisplay simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsAutomaticResultsDisplay() As RiskAutomaticResultsDisplay

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsAutomaticResultsDisplay Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 243: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | AutomaticResultsDisplay Property

© Palisade Corporation. All Rights Reserved.

Page 244: RISK Object Library - Palisade Corporation

Description

Sets the default CollectDistributionSamples simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsCollectDistributionSamples() As RiskCollectDistributionSamples

Remarks

This setting is a default setting for new models. The ApplyNow Method will apply this setting to the current @RISK simulation settings.

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

SimSettingsCollectDistributionSamples Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 245: RISK Object Library - Palisade Corporation

Description

Sets the default ConvergenceTestingEnabled simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsConvergenceTestingEnabled() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsConvergenceTestingEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 246: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | ConvergenceTestingEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 247: RISK Object Library - Palisade Corporation

Description

Sets the default LiveUpdate simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsLiveUpdate() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsLiveUpdate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 248: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | LiveUpdate Property

© Palisade Corporation. All Rights Reserved.

Page 249: RISK Object Library - Palisade Corporation

Description

Sets the default MinimizeExcel simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsMinimizeExcel() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsMinimizeExcel Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 250: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | MinimizeExcel Property

© Palisade Corporation. All Rights Reserved.

Page 251: RISK Object Library - Palisade Corporation

Description

Sets the default NumIterations simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsNumIterations() As Long

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Use the special value RiskAutoNumIterations to have @RISK use convergence monitoring to determine how many iterations to run.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

SimSettingsNumIterations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 252: RISK Object Library - Palisade Corporation

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | NumIterations Property | RiskAutoNumIterations Property

© Palisade Corporation. All Rights Reserved.

Page 253: RISK Object Library - Palisade Corporation

Description

Sets the default PauseOnOutputErrors simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsPauseOnOutputErrors() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsPauseOnOutputErrors Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 254: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | PauseOnOutputErrors Property

© Palisade Corporation. All Rights Reserved.

Page 255: RISK Object Library - Palisade Corporation

Description

Sets the default SamplingType simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsSamplingType() As RiskSamplingType

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsSamplingType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 256: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | SamplingType Property

© Palisade Corporation. All Rights Reserved.

Page 257: RISK Object Library - Palisade Corporation

Description

Sets the default ShowExcelRecalculations simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsShowExcelRecalculations() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsShowExcelRecalculations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 258: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | ShowExcelRecalculations Property

© Palisade Corporation. All Rights Reserved.

Page 259: RISK Object Library - Palisade Corporation

Description

Controls whether smart sensitivity analysis will is enabled.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsSmartSensitivityAnalysisEnabled() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

See Also

RiskApplicationSettings Object | ApplyNow Method | SmartSensitivityAnalysisEnabled Property

© Palisade Corporation. All Rights Reserved.

SimSettingsSmartSensitivityAnalysisEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 260: RISK Object Library - Palisade Corporation

Description

Controls when @RISK statistic functions will be updated during a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsStatisticFunctionUpdating() As RiskStatisticFunctionUpdating

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

See Also

RiskApplicationSettings Object | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

SimSettingsStatisticFunctionUpdating Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 261: RISK Object Library - Palisade Corporation

Description

Sets the default StdRecalcBehavior simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsStdRecalcBehavior() As RiskStandardRecalcBehavior

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsStdRecalcBehavior Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 262: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | StdRecalcBehavior Property

© Palisade Corporation. All Rights Reserved.

Page 263: RISK Object Library - Palisade Corporation

Description

Sets the default StdRecalcWithoutRiskStatic simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsStdRecalcWithoutRiskStatic() As RiskStaticValueType

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsStdRecalcWithoutRiskStatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 264: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | StdRecalcWithoutRiskStatic Property

© Palisade Corporation. All Rights Reserved.

Page 265: RISK Object Library - Palisade Corporation

Description

Sets the default StdRecalcWithoutRiskStaticPercentile simulation settings for new models.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsStdRecalcWithoutRiskStaticPercentile() As Double

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

Example

[[New Example] (Visual Basic)]

'Change the default simulation settings for new model to follow a new pattern.

Public Sub SetDefaultSimulationSettings()

With Risk.ApplicationSettings

.SimSettingsNumIterations = 1000

.SimSettingsAutomaticResultsDisplay = RiskShowResultsSummaryWindow

.SimSettingsConvergenceTestingEnabled = False

.SimSettingsMinimizeExcel = False

.SimSettingsShowExcelRecalculations = False

.SimSettingsLiveUpdate = True

.SimSettingsPauseOnOutputErrors = False

.SimSettingsSamplingType = RiskLatinHypercube

.SimSettingsStdRecalcBehavior = RiskStaticValues

.SimSettingsStdRecalcWithoutRiskStatic = RiskPercentileValue

.SimSettingsStdRecalcWithoutRiskStaticPercentile = 0.75

End With

SimSettingsStdRecalcWithoutRiskStaticPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 266: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskApplicationSettings Object | ApplyNow Method | StdRecalcWithoutRiskStaticPercentile Property

© Palisade Corporation. All Rights Reserved.

Page 267: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will use multiple CPUs (if there is more than one CPU on the machine) to perform simulations.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimSettingsUseMultipleCPUs() As Boolean

Remarks

This setting is a default setting for new models. The ApplyNow method will apply this setting to the current @RISK simulation settings.

See Also

RiskApplicationSettings Object | ApplyNow Method

© Palisade Corporation. All Rights Reserved.

SimSettingsUseMultipleCPUs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 268: RISK Object Library - Palisade Corporation

SwapPreviewChanges Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 269: RISK Object Library - Palisade Corporation

Description

Controls what items are previewed when swapping in formulas.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SwapPreviewChanges() As RiskSwapPreviewChanges

Remarks

When swapping in @RISK function, a preview dialog can be displayed to the user, asking them to approve the changes that will be made to their spreadsheet. This settings controls

under what circumstances this dialog will be displayed, and what items it will contain.

Example

[[New Example] (Visual Basic)]

'Set the swapping option to always swap out to the 75% (when no RiskStatic() value is present)

'And to preview all changes on swap-in.

Public Sub SetSwapOptions()

With Risk.ApplicationSettings

.SwapPreviewChanges = RiskPreviewAll

.SwapWithoutRiskStatic = RiskPercentileValue

.SwapWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskApplicationSettings Object | SwapWithoutRiskStatic Property | SwapWithoutRiskStaticPercentile Property | RiskSwapPreviewChanges Enumeration

Page 270: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 271: RISK Object Library - Palisade Corporation

Description

Controls what statistic is substituted when the user swaps out @RISK functions that do not contain RiskStatic() property functions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SwapWithoutRiskStatic() As RiskStaticValueType

Remarks

When a swap out occurs, @RISK function are replaced with their static values (if they have one defined with an RiskStatic() property function). This property controls the statistic value to

use for those functions without a static value.

If this property is set to RiskPercentileValue, the SwapWithoutRiskStaticPercentile property specifies which percentile to use.

Example

[[New Example] (Visual Basic)]

'Set the swapping option to always swap out to the 75% (when no RiskStatic() value is present)

'And to preview all changes on swap-in.

Public Sub SetSwapOptions()

With Risk.ApplicationSettings

.SwapPreviewChanges = RiskPreviewAll

.SwapWithoutRiskStatic = RiskPercentileValue

.SwapWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskApplicationSettings Object | SwapWithoutRiskStaticPercentile Property | SwapPreviewChanges Property

SwapWithoutRiskStatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 272: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 273: RISK Object Library - Palisade Corporation

Description

Controls what percentile is substituted when the user swaps out @RISK functions that do not contain RiskStatic() property functions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SwapWithoutRiskStaticPercentile() As Double

Remarks

When a swap out occurs, @RISK function are replaced with their static values (if they have one defined with an RiskStatic() property function). This property controls the percentile value

to use for those functions without a static value.

This property is only relevant if the SwapWithoutRiskStatic property is set to RiskPercentileValue.

Example

[[New Example] (Visual Basic)]

'Set the swapping option to always swap out to the 75% (when no RiskStatic() value is present)

'And to preview all changes on swap-in.

Public Sub SetSwapOptions()

With Risk.ApplicationSettings

.SwapPreviewChanges = RiskPreviewAll

.SwapWithoutRiskStatic = RiskPercentileValue

.SwapWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskApplicationSettings Object | SwapWithoutRiskStatic Property | SwapPreviewChanges Property

SwapWithoutRiskStaticPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 274: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 275: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesCenterline() As RiskSummaryGraphCenterlineStatistic

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesCenterline Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 276: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesCenterlineColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesCenterlineColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 277: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesCurrentSimulationColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesCurrentSimulationColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 278: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesHistoricalDataColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesHistoricalDataColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 279: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesInnerColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesInnerColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 280: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesInnerRange() As RiskSummaryGraphRange

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesInnerRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 281: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesNumberOfDefaultDataPoints() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesNumberOfDefaultDataPoints Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 282: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesNumberOfPreviousPaths() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesNumberOfPreviousPaths Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 283: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesOrientation() As RiskTimeSeriesOrientation

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesOrientation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 284: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesOuterColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesOuterColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 285: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesOuterRange() As RiskSummaryGraphRange

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesOuterRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 286: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesPreviousSimulationColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesPreviousSimulationColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 287: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property TimeSeriesVerticalDelimiterColor() As Long

See Also

RiskApplicationSettings Object

© Palisade Corporation. All Rights Reserved.

TimeSeriesVerticalDelimiterColor Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 288: RISK Object Library - Palisade Corporation

Description

Controls the default size of new @RISK windows.

Property type

Read-write property

Syntax (Visual Basic)

Public Property WindowDefaultSize() As RiskWindowSize

Remarks

This property only controls the default size of a new @RISK window. Once the window is created, the user is free to resize it as they see fit.

Example

[[New Example] (Visual Basic)]

'Make new @RISK windows have by default a large size.

Public Sub SetWindowDefaultSize()

Risk.ApplicationSettings.WindowDefaultSize = RiskWindowSizeLarge

End Sub

See Also

RiskApplicationSettings Object | RiskWindowSize Enumeration

© Palisade Corporation. All Rights Reserved.

WindowDefaultSize Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 289: RISK Object Library - Palisade Corporation

Description

Controls under what circumstances the @RISK Windows List will be displayed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property WindowListDisplay() As RiskWindowListDisplay

See Also

RiskApplicationSettings Object | RiskWindowListDisplay Enumeration

© Palisade Corporation. All Rights Reserved.

WindowListDisplay Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 290: RISK Object Library - Palisade Corporation

Description

A collection of @RISK constants.

For a list of all members defined in this module, see RiskConstants members.

Remarks

NOTE: These constants need only be used from this object when demand-loading @RISK for automation, or automation from .NET. For normal VBA development, these constants are

available directly from Risk.xla.

See Also

RiskConstants Members

© Palisade Corporation. All Rights Reserved.

RiskConstants Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 291: RISK Object Library - Palisade Corporation

Public Methods

Public Properties

RiskAutoBaseValue Specifies an automatic base value for sensitivity analysis.

RiskAutomaticSeed A special value that can be used to specify a random seed based on the machine's clock.

RiskAutomaticText A special constant value that may be used in several properties to indicate the specified property is under the automatic

control of the @RISK application.

RiskAutoNumChiSqBins A special value which indicates an automatically determined number of chi-squared bins.

RiskAutoNumHistogramBins A special constant value used to indicate an automatic number of histogram bins.

RiskAutoNumIterations A special value indicating an automatic number of iterations. This typically means the the number of iteration will be

determined automatically by the software using convergence monitoring techniques.

RiskAutoNumSeconds A special value that can be used to specify an automatic time increment.

RiskNaN A special value used by @RISK to set or returns a nonexistant number.

RiskNegativeInfinity A special value used by @RISK to set or returns a negative infinite result.

RiskPositiveInfinity A special value used by @RISK to set or returns a positive infinite result.

See Also

RiskConstants Overview

RiskConstants Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 292: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 293: RISK Object Library - Palisade Corporation

Syntax

Public Function () As String

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 294: RISK Object Library - Palisade Corporation

Description

Specifies an automatic base value for sensitivity analysis.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutoBaseValue() As Double

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskAutoBaseValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 295: RISK Object Library - Palisade Corporation

Description

A special value that can be used to specify a random seed based on the machine's clock.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutomaticSeed() As Long

See Also

RiskConstants Object | RandomSeed Property

© Palisade Corporation. All Rights Reserved.

RiskAutomaticSeed Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 296: RISK Object Library - Palisade Corporation

Description

A special constant value that may be used in several properties to indicate the specified property is under the automatic control of the @RISK application.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutomaticText() As String

See Also

RiskConstants Object | GraphTitleMainText Property | GraphTitleDescription Property

© Palisade Corporation. All Rights Reserved.

RiskAutomaticText Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 297: RISK Object Library - Palisade Corporation

Description

A special value which indicates an automatically determined number of chi-squared bins.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutoNumChiSqBins() As Integer

See Also

RiskConstants Object | ChiSqBinCount Property

© Palisade Corporation. All Rights Reserved.

RiskAutoNumChiSqBins Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 298: RISK Object Library - Palisade Corporation

Description

A special constant value used to indicate an automatic number of histogram bins.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutoNumHistogramBins() As Long

See Also

RiskConstants Object | GraphNumHistogramBins Property

© Palisade Corporation. All Rights Reserved.

RiskAutoNumHistogramBins Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 299: RISK Object Library - Palisade Corporation

Description

A special value indicating an automatic number of iterations. This typically means the the number of iteration will be determined automatically by the software using convergence

monitoring techniques.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutoNumIterations() As Long

See Also

RiskConstants Object | NumIterations Property | SimSettingsNumIterations Property

© Palisade Corporation. All Rights Reserved.

RiskAutoNumIterations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 300: RISK Object Library - Palisade Corporation

Description

A special value that can be used to specify an automatic time increment.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskAutoNumSeconds() As Long

See Also

RiskConstants Object | LiveUpdatePeriod Property

© Palisade Corporation. All Rights Reserved.

RiskAutoNumSeconds Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 301: RISK Object Library - Palisade Corporation

Description

A special value used by @RISK to set or returns a nonexistant number.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskNaN() As Double

Remarks

@RISK does not use a standard floating-point NaN value because Excel's VBA will often throw an exception when handling such numbers.

See Also

RiskConstants Object | RiskNegativeInfinity Property | RiskPositiveInfinity Property

© Palisade Corporation. All Rights Reserved.

RiskNaN Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 302: RISK Object Library - Palisade Corporation

Description

A special value used by @RISK to set or returns a negative infinite result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskNegativeInfinity() As Double

Remarks

@RISK does not use a standard floating-point +Infinity value because Excel's VBA will often throw an exception when handling such numbers.

See Also

RiskConstants Object | RiskNaN Property | RiskNegativeInfinity Property

© Palisade Corporation. All Rights Reserved.

RiskNegativeInfinity Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 303: RISK Object Library - Palisade Corporation

Description

A special value used by @RISK to set or returns a positive infinite result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RiskPositiveInfinity() As Double

Remarks

@RISK does not use a standard floating-point -Infinity value because Excel's VBA will often throw an exception when handling such numbers.

See Also

RiskConstants Object | RiskNaN Property | RiskNegativeInfinity Property

© Palisade Corporation. All Rights Reserved.

RiskPositiveInfinity Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 304: RISK Object Library - Palisade Corporation

Description

The definition of a fit which exists in a currently open Excel workbook.

For a list of all members defined in this module, see RiskFitDefinition members.

Object Model

See Also

RiskFitDefinition Members

© Palisade Corporation. All Rights Reserved.

RiskFitDefinition Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 305: RISK Object Library - Palisade Corporation

Public Methods

ChiSqBinGetCustomBoundaries Returns the boundaries to be used for custom chi-sq binning.

ChiSqBinSetCustomBoundaries Sets the boundaries to be used for custom chi-sq binning.

Delete Deletes this fit definition and removes if from the collection of fit definitions.

EstimatedFitsGetList Returns an array of distribution types to use in the fitting process.

EstimatedFitsSetList Sets an array of distribution types to use in the fitting process.

PerformFit Performs a fit based on the current definition and returns a new RiskFitResultsCollection object

PredefinedFitsGetList Returns an array of predefined functions to use in the fitting process.

PredefinedFitsSetList Sets an array of predefined functions to use in the fitting process.

Public Properties

BatchFit Indicates if this fit is a "batch" fit or not.

BatchFitReportIncludeCorrelations Indicates if batch fits include correlations between the individually fitted elements in the batch fit report.

BatchFitReportIncludeDetailWorksheets Indicates if batch fits include detailed reports for each of the individually fitted elements in the batch fit report.

BatchFitReportInNewWorkbook Indicates if batch fit reports are put into a new workbook.

BatchFitReportStyle Indicates the style of batch fit reports.

BootstrapConfidenceLevel Specifies the confidence level to use for parametric bootstrap analysis.

BootstrapEnabled Specifies if a parameteric bootstrap analysis should be run as part of the fitting process.

RiskFitDefinition Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 306: RISK Object Library - Palisade Corporation

BootstrapNumResamples Specifies the number of resamples in the parameteric bootstrap analysis.

ChiSqBinArrangement Controls the style of binning used for the Chi-Squared goodness-of-fit test.

ChiSqBinAutomaticLimits For equal interval chi-sq binning, controls whether the minimum-maximum range is determined automatically.

ChiSqBinCount Controls the number of bins used for the chi-squared goodness-of-fit test.

ChiSqBinExtendToMinusInfinity For equal interval chi-squared binning, specifies if the first bin extends from -Infinity to a minimum value.

ChiSqBinExtendToPlusInfinity For equal interval chi-squared binning, specifies if the last bin extends from a maximum value to +Infinity

ChiSqBinMaximum For equal-interval chi-sq binning, controls the location of the right side of the last bin.

ChiSqBinMinimum For equal-interval chi-sq binning, controls the location of the left side of the first bin.

DataRange Specifies the Excel Range where the data being fit resides.

DataType Specifies the type of data being fit.

ExcelWorkbook Returns the Excel Workbook associated with the fit definition.

FilterMaximum Controls the minimum value of an input filter that occurs on data before fitting takes place.

FilterMinimum Controls the minimum value of an input filter that occurs on data before fitting takes place.

FilterNumStdDeviations Controls the size of a relative input filter that occurs on data before fitting takes place.

FilterType Controls what type of input filtering occurs on the data before fitting takes place.

FitMethod Controls whether fits are performed using mathematical estimation techniques or to predefined distributions.

FixedParameter Specifies one or more fixed parameters for the fitting process.

FixedParametersEnabled

LowerLimitType Controls the nature of the lower limits of distribution that are estimated during the fitting process.

LowerLimitValue Controls the fixed lower value for an estimated fit.

Page 307: RISK Object Library - Palisade Corporation

Name Controls the name of the fit definition.

SuppressQuestionableFits Controls whether fits that are "questionable" from a meta-mathematical standpoint are suppressed from the fit results.

UpperLimitType Controls the nature of the upper limits of distribution that are estimated during the fitting process.

UpperLimitValue Controls the fixed upper value for an estimated fit.

ValuesAreDates Controls whether fit data is in date format.

See Also

RiskFitDefinition Overview

© Palisade Corporation. All Rights Reserved.

Page 308: RISK Object Library - Palisade Corporation

Description

Returns the boundaries to be used for custom chi-sq binning.

Syntax

Public Function ChiSqBinGetCustomBoundaries( _

ByRef p_Values() As Double _

) As Integer

Parameters

p_Values

A 1-D array of doubles. The number of values in this array is one more than the number of bins. This array is 1-based.

Return Type

Integer - The number of boundaries.

Remarks

This method is only relevant if ChiSqBinArrangement = RiskCustomBins.

Example

[[New Example] (Visual Basic)]

'Displays the custom boundaries for the fit called 'MyFit'.

Public Sub DisplayCustomChiSqBinBoundaries()

Dim fitDefinition As RiskFitDefinition

Dim numBoundaries As Integer

Dim binBoundaries() As Double

Dim displayString As String

Dim i As Integer

Set fitDefinition = Risk.Fits("MyFit")

ChiSqBinGetCustomBoundaries Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 309: RISK Object Library - Palisade Corporation

If fitDefinition.ChiSqBinArrangement = RiskCustomBins Then

numBoundaries = fitDefinition.ChiSqBinGetCustomBoundaries(binBoundaries)

displayString = CStr(numBoundaries) & " Boundaries : {"

For i = 1 To numBoundaries

If i > 1 Then displayString = displayString & ","

displayString = displayString & CStr(binBoundaries(i))

Next i

displayString = displayString & "}"

Else

displayString = "Not using custom bins."

End If

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinSetCustomBoundaries Method

© Palisade Corporation. All Rights Reserved.

Page 310: RISK Object Library - Palisade Corporation

Description

Sets the boundaries to be used for custom chi-sq binning.

Syntax

Public Sub ChiSqBinSetCustomBoundaries( _

ByRef p_Values() As Double _

)

Parameters

p_Values

A 1-D array of doubles. The number of values in this array is one more than the number of bins. This array must be 1-based.

Remarks

Calling this method will automatically set ChiSqBinArrangement = RiskCustomBins.

Example

[[New Example] (Visual Basic)]

'Changes "MyFit" to use 4 custom chi-sq bins with boundaries {0,1,2.5,6,18}

Public Sub SetCustomChiSqBinBoundaries()

Dim fitDefinition As RiskFitDefinition

Dim binBoundaries(1 To 5) As Double

binBoundaries(1) = 0

binBoundaries(2) = 1

binBoundaries(3) = 2.5

binBoundaries(4) = 6

binBoundaries(5) = 18

Set fitDefinition = Risk.Fits("MyFit")

ChiSqBinSetCustomBoundaries Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 311: RISK Object Library - Palisade Corporation

fitDefinition.ChiSqBinSetCustomBoundaries binBoundaries

End Sub

See Also

RiskFitDefinition Object | ChiSqBinGetCustomBoundaries Method | ChiSqBinArrangement Property

© Palisade Corporation. All Rights Reserved.

Page 312: RISK Object Library - Palisade Corporation

Description

Deletes this fit definition and removes if from the collection of fit definitions.

Syntax

Public Sub Delete()

Example

[[New Example] (Visual Basic)]

'Deletes the fit definition 'MyFit'.

Public Sub DeleteFitDefinition

Risk.Fits("MyFit").Delete

End Sub

See Also

RiskFitDefinition Object | Add Method

© Palisade Corporation. All Rights Reserved.

Delete Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 313: RISK Object Library - Palisade Corporation

Description

Returns an array of distribution types to use in the fitting process.

Syntax

Public Function EstimatedFitsGetList( _

ByRef p_DistributionNames() As String _

) As Integer

Parameters

p_DistributionNames

An array of strings. Each string is the name of an @RISK distribution type (without a "Risk" prefix). Examples are "Normal", "Triang", "Uniform". The array is 1-based.

Return Type

Integer - the number of distribution types in the array.

Remarks

This method is only relevant if FitMethod = RiskEstimatedParameters.

Only the distributions which are compatible with the data type and the lower and upper limits specified will actually be used. For example, if discrete data is being fit and there are three

items in the list ("Normal", "IntUniform", and "Geomet"), the Normal distribution will be ignored.

Example

[[New Example] (Visual Basic)]

'Display the list of estimated fits currently selected for "MyFit".

Public Sub DisplaySelectedEstimatedFits()

Dim fitDefinition As RiskFitDefinition

Dim numberOfDists As Integer

Dim distTypesToFit() As String

Dim displayString As String

EstimatedFitsGetList Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 314: RISK Object Library - Palisade Corporation

Dim i As Integer

Set fitDefinition = Risk.Fits("MyFit")

If fitDefinition.FitMethod = RiskEstimatedParameters Then

numberOfDists = fitDefinition.EstimatedFitsGetList(distTypesToFit)

displayString = "Num Distributions = " & numberOfDists & " : {"

For i = 1 To numberOfDists

If i > 1 Then displayString = displayString & ","

displayString = displayString & distTypesToFit(i)

Next i

displayString = displayString & "}"

Else

displayString = "Not in estimated paramters mode."

End If

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | EstimatedFitsSetList Method | FitMethod Property

© Palisade Corporation. All Rights Reserved.

Page 315: RISK Object Library - Palisade Corporation

Description

Sets an array of distribution types to use in the fitting process.

Syntax

Public Sub EstimatedFitsSetList( _

ByRef p_DistributionNames() As String _

)

Parameters

p_DistributionNames

An array of strings. Each string is the name of an @RISK distribution type (with or without a "Risk" prefix). Examples are "Normal", "Triang", "Uniform". The array must be 1-based.

Remarks

Calling this method automatically sets FitMethod = RiskEstimatedParameters.

Only the distributions which are compatible with the data type and the lower and upper limits specified will actually be used. For example, if discrete data is being fit and there are three

items in the list ("Normal", "IntUniform", and "Geomet"), the Normal distribution will be ignored.

Example

[[New Example] (Visual Basic)]

'Set the list of estimated fits for "MyFit" to include Normal, Expon, and Weibull fits.

Public Sub SetEstimatedFits()

Dim fitDefinition As RiskFitDefinition

Dim distTypesToFit() As String

Set fitDefinition = Risk.Fits("MyFit")

Redim distTypesToFit(1 To 3)

distTypesToFit(1) = "Normal"

EstimatedFitsSetList Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 316: RISK Object Library - Palisade Corporation

distTypesToFit(2) = "Expon"

distTypesToFit(3) = "Weibull"

fitDefinition.EstimatedFitsSetList distTypesToFit

End Sub

See Also

RiskFitDefinition Object | EstimatedFitsGetList Method | FitMethod Property

© Palisade Corporation. All Rights Reserved.

Page 317: RISK Object Library - Palisade Corporation

PerformFit Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 318: RISK Object Library - Palisade Corporation

Description

Performs a fit based on the current definition and returns a new RiskFitResultsCollection object

Syntax

Public Function PerformFit() As RiskFitResultCollection

Return Type

If the fit in question is NOT a batch fit, the return value is a new RiskFitResultsCollection Object containing all the information for the fitted results. For a batch fit, however, the return code

will always be a Null reference.

Remarks

To suppress the fitting progress window use the Risk.DisplayAlerts property

Example

[[New Example] (Visual Basic)]

'Performs the fit specified in "MyFit" and displays the best fitting Normal distribution.

Public Sub PerformFit()

Dim fitDefinition As RiskFitDefinition

Dim fitResults As RiskFitResultCollection

Set fitDefinition = Risk.Fits("MyFit")

Set fitResults = fitDefinition.PerformFit()

MsgBox fitResults.Item("Normal").DistributionFunction

End Sub

See Also

RiskFitDefinition Object | RiskFitResultCollection Object | DisplayAlerts Property

Page 319: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 320: RISK Object Library - Palisade Corporation

Description

Returns an array of predefined functions to use in the fitting process.

Syntax

Public Function PredefinedFitsGetList( _

ByRef p_Fits() As RiskPredefinedFit _

) As Integer

Parameters

p_Fits

An array of RiskPredefinedFit structures, each containing the Name, Distribution Function, and Enabled state of that particular fit. The array is 1-based.

Return Type

Integer - The number of predefined fits.

Remarks

This method is only relevant if FitMethod = RiskPredefinedDistributions.

Only the distributions which are compatible with the data type will actually be used. For example, if discrete data is being fit and there are three items in the list ("RiskNormal(0,10)",

"IntUniform(0,10)", and "Geomet(.5)"), the Normal distribution will be ignored.

Example

[[New Example] (Visual Basic)]

'Display the list of predefined distributions currently selected for "MyFit".

Public Sub DisplayPredefinedFits()

Dim fitDefinition As RiskFitDefinition

Dim numberOfFits As Integer

Dim predefinedFits() As RiskPredefinedFit

Dim displayString As String

PredefinedFitsGetList Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 321: RISK Object Library - Palisade Corporation

Dim i As Integer

Set fitDefinition = Risk.fits("MyFit")

If fitDefinition.FitMethod = RiskPredefinedDistributions Then

numberOfFits = fitDefinition.PredefinedFitsGetList(predefinedFits)

displayString = "Num Predefined Fits = " & numberOfFits & " : " & vbCrLf

For i = 1 To numberOfFits

If i > 1 Then displayString = displayString & vbCrLf

displayString = displayString & predefinedFits(i).Name & "=" & predefinedFits(i).DistributionFunction

If Not predefinedFits(i).Enabled Then displayString = displayString & "(Disabled)"

Next i

Else

displayString = "Not in predefined distribution mode."

End If

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | PredefinedFitsSetList Method | FitMethod Property | RiskPredefinedFit Structure

© Palisade Corporation. All Rights Reserved.

Page 322: RISK Object Library - Palisade Corporation

Description

Sets an array of predefined functions to use in the fitting process.

Syntax

Public Sub PredefinedFitsSetList( _

ByRef p_Fits() As RiskPredefinedFit _

)

Parameters

p_Fits

An array of RiskPredefinedFit structures, each containing the Name, Distribution Function, and Enabled state of that particular fit. The array is 1-based.

Remarks

Calling this method will automatically set FitMethod = RiskPredefinedDistributions.

Only the distributions which are compatible with the data type will actually be used. For example, if discrete data is being fit and there are three items in the list ("RiskNormal(0,10)",

"IntUniform(0,10)", and "Geomet(.5)"), the Normal distribution will be ignored.

Example

[[New Example] (Visual Basic)]

'Sets a pair of competing hypotheses for "MyFit"

Public Sub SetPredefinedFits()

Dim fitDefinition As RiskFitDefinition

Dim predefinedFits() As RiskPredefinedFit

Set fitDefinition = Risk.fits("MyFit")

ReDim predefinedFits(1 To 2)

PredefinedFitsSetList Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 323: RISK Object Library - Palisade Corporation

With predefinedFits(1)

.Name = "Hypothesis A"

.DistributionFunction = "RiskNormal(100,10)"

.Enabled = True

End With

With predefinedFits(2)

.Name = "Hypothesis B"

.DistributionFunction = "RiskNormal(110,11)"

.Enabled = True

End With

fitDefinition.PredefinedFitsSetList predefinedFits

End Sub

See Also

RiskFitDefinition Object | PredefinedFitsGetList Method | FitMethod Property | RiskPredefinedFit Structure

© Palisade Corporation. All Rights Reserved.

Page 324: RISK Object Library - Palisade Corporation

Description

Indicates if this fit is a "batch" fit or not.

Property type

Read-only property

Syntax (Visual Basic)

Public Property BatchFit() As Boolean

Remarks

To create a batch fit, use the AddBatch Method.

See Also

RiskFitDefinition Object | AddBatch Method | BatchFitReportIncludeCorrelations Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportInNewWorkbook Property

| BatchFitReportStyle Property | BatchFitSelectorStatistic Property

© Palisade Corporation. All Rights Reserved.

BatchFit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 325: RISK Object Library - Palisade Corporation

Description

Indicates if batch fits include correlations between the individually fitted elements in the batch fit report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BatchFitReportIncludeCorrelations() As Boolean

See Also

RiskFitDefinition Object | BatchFit Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportInNewWorkbook

Property | BatchFitReportStyle Property | BatchFitSelectorStatistic Property

© Palisade Corporation. All Rights Reserved.

BatchFitReportIncludeCorrelations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 326: RISK Object Library - Palisade Corporation

Description

Indicates if batch fits include detailed reports for each of the individually fitted elements in the batch fit report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BatchFitReportIncludeDetailWorksheets() As Boolean

Remarks

Note: This property only applies if the BatchFitReportStyle Property is set to RiskBatchFitStandardReport.

See Also

RiskFitDefinition Object | BatchFit Property | BatchFitReportIncludeCorrelations Property | BatchFitReportInNewWorkbook Property | BatchFitReportStyle Property

| BatchFitSelectorStatistic Property

© Palisade Corporation. All Rights Reserved.

BatchFitReportIncludeDetailWorksheets Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 327: RISK Object Library - Palisade Corporation

Description

Indicates if batch fit reports are put into a new workbook.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BatchFitReportInNewWorkbook() As Boolean

See Also

RiskFitDefinition Object | BatchFit Property | BatchFitReportIncludeCorrelations Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportStyle Property

| BatchFitSelectorStatistic Property

© Palisade Corporation. All Rights Reserved.

BatchFitReportInNewWorkbook Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 328: RISK Object Library - Palisade Corporation

Description

Indicates the style of batch fit reports.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BatchFitReportStyle() As RiskBatchFitReportStyle

See Also

RiskFitDefinition Object | BatchFit Property | BatchFitReportIncludeCorrelations Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportInNewWorkbook Property

| BatchFitSelectorStatistic Property

© Palisade Corporation. All Rights Reserved.

BatchFitReportStyle Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 329: RISK Object Library - Palisade Corporation

Description

Specifies the confidence level to use for parametric bootstrap analysis.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BootstrapConfidenceLevel() As Double

Remarks

This parameter has no effect unless the BootstrapEnabled Property is True.

Specify a number between 0 and 1.

Example

[Visual Basic]

'Specify a parametric bootstrap of 1000 resamples and a 95% confidence level

Public Sub ConfigureParametericBoostrap()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

fitDefinition.BootstrapEnabled = True

fitDefinition.BootstrapConfidenceLevel = .95

fitDefinition.BootstrapNumResamples = 1000

End Sub

See Also

RiskFitDefinition Object | BootstrapEnabled Property | BootstrapNumResamples Property

BootstrapConfidenceLevel Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 330: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 331: RISK Object Library - Palisade Corporation

Description

Specifies if a parameteric bootstrap analysis should be run as part of the fitting process.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BootstrapEnabled() As Boolean

Remarks

The BootstrapConfidenceLevel Property and the BootstrapNumResamples Property control the details of the parametric bootstrap.

Example

[Visual Basic]

'Specify a parametric bootstrap of 1000 resamples and a 95% confidence level

Public Sub ConfigureParametericBoostrap()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

fitDefinition.BootstrapEnabled = True

fitDefinition.BootstrapConfidenceLevel = .95

fitDefinition.BootstrapNumResamples = 1000

End Sub

See Also

RiskFitDefinition Object | BootstrapConfidenceLevel Property | BootstrapNumResamples Property

BootstrapEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 332: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 333: RISK Object Library - Palisade Corporation

Description

Specifies the number of resamples in the parameteric bootstrap analysis.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BootstrapNumResamples() As Long

Remarks

This parameter has no effect unless the BootstrapEnabled Property is True.

Example

[Visual Basic]

'Specify a parametric bootstrap of 1000 resamples and a 95% confidence level

Public Sub ConfigureParametericBoostrap()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

fitDefinition.BootstrapEnabled = True

fitDefinition.BootstrapConfidenceLevel = .95

fitDefinition.BootstrapNumResamples = 1000

End Sub

See Also

RiskFitDefinition Object | BootstrapConfidenceLevel Property | BootstrapEnabled Property

BootstrapNumResamples Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 334: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 335: RISK Object Library - Palisade Corporation

ChiSqBinArrangement Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 336: RISK Object Library - Palisade Corporation

Description

Controls the style of binning used for the Chi-Squared goodness-of-fit test.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinArrangement() As RiskFitChiSqBinArrangement

Remarks

Many of the other ChiSqBin properties of this object only are relevant when this setting is appropriately configured.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binning of 'MyFit' to use 10 bins of equal probability:

Public Sub ChangeChiSqBinning()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

fitDefinition.ChiSqBinArrangement = RiskEqualProbabilities

fitDefinition.ChiSqBinCount = 10

End Sub

See Also

RiskFitDefinition Object | ChiSqBinAutomaticLimits Property | ChiSqBinCount Property | ChiSqBinExtendToMinusInfinity Property | ChiSqBinExtendToPlusInfinity Property

| ChiSqBinMaximum Property | ChiSqBinMinimum Property | ChiSqBinGetCustomBoundaries Method | ChiSqBinSetCustomBoundaries Method | RiskFitChiSqBinArrangement

Enumeration

Page 337: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 338: RISK Object Library - Palisade Corporation

Description

For equal interval chi-sq binning, controls whether the minimum-maximum range is determined automatically.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinAutomaticLimits() As Boolean

Remarks

This property only is relevant if ChiSqBinArrangement = RiskEqualIntervals.

If this property is TRUE, ChiSqBinMinimum and ChiSqBinMaximum are ignored. If this property is FALSE, those properties are used.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binning of 'MyFit' to use 4 bins with equally spaced intervals from 0 to 10:

Public Sub SpecifyEqualIntervalChiSqBins()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

With fitDefinition

.ChiSqBinArrangement = RiskEqualIntervals

.ChiSqBinCount = 4

.ChiSqBinAutomaticLimits = False

.ChiSqBinMinimum = 0

.ChiSqBinMaximum = 10

ChiSqBinAutomaticLimits Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 339: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinCount Property | ChiSqBinExtendToMinusInfinity Property | ChiSqBinExtendToPlusInfinity Property

| ChiSqBinMaximum Property | ChiSqBinMinimum Property

© Palisade Corporation. All Rights Reserved.

Page 340: RISK Object Library - Palisade Corporation

Description

Controls the number of bins used for the chi-squared goodness-of-fit test.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinCount() As Integer

Remarks

You may specified the special value of RiskAutoNumChiSqBins to let this value be determined automatically by the software.

You must specified between 2 and 1000 bins.

This value is not writable when the ChiSqBinArrangement = RiskCustomBins

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binning of 'MyFit' to use 10 bins of equal probability:

Public Sub ChangeChiSqBinning()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

fitDefinition.ChiSqBinArrangement = RiskEqualProbabilities

fitDefinition.ChiSqBinCount = 10

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinArrangement Property | RiskAutoNumChiSqBins Property

ChiSqBinCount Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 341: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 342: RISK Object Library - Palisade Corporation

Description

For equal interval chi-squared binning, specifies if the first bin extends from -Infinity to a minimum value.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinExtendToMinusInfinity() As Boolean

Remarks

If this option is TRUE, the first chi-sq bin will not, in fact, have the same spacing as the other bins. The first bin will extend from -Infinity to the "minimum" value (either calculated

automatically or specified directly in the ChiSqBinMinimum property.)

This property only is relevant if ChiSqBinArrangement = RiskEqualIntervals.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binnig of 'MyFit' to use 6 bins. The middle 4 bins are equally spaced from 0 to 10,

'while the first bin extends from -Infinity to 0 and the last from 10 to +Infinity:

Public Sub SpecifyEqualIntervalChiSqBinsWithExtendedLimits()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

With fitDefinition

.ChiSqBinArrangement = RiskEqualIntervals

.ChiSqBinCount = 6

.ChiSqBinAutomaticLimits = False

ChiSqBinExtendToMinusInfinity Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 343: RISK Object Library - Palisade Corporation

.ChiSqBinMinimum = 0

.ChiSqBinMaximum = 10

.ChiSqBinExtendToMinusInfinity = True

.ChiSqBinExtendToPlusInfinity = True

End With

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinAutomaticLimits Property | ChiSqBinCount Property | ChiSqBinExtendToPlusInfinity Property | ChiSqBinMaximum

Property | ChiSqBinMinimum Property

© Palisade Corporation. All Rights Reserved.

Page 344: RISK Object Library - Palisade Corporation

Description

For equal interval chi-squared binning, specifies if the last bin extends from a maximum value to +Infinity

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinExtendToPlusInfinity() As Boolean

Remarks

If this option is TRUE, the last chi-sq bin will not, in fact, have the same spacing as the other bins. The last bin will extend from the "maximum" value (either calculated automatically or

specified directly in the ChiSqBinMaximum property) to +Infinity.

This property only is relevant if ChiSqBinArrangement = RiskEqualIntervals.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binnig of 'MyFit' to use 6 bins. The middle 4 bins are equally spaced from 0 to 10,

'while the first bin extends from -Infinity to 0 and the last from 10 to +Infinity:

Public Sub SpecifyEqualIntervalChiSqBinsWithExtendedLimits()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

With fitDefinition

.ChiSqBinArrangement = RiskEqualIntervals

.ChiSqBinCount = 6

.ChiSqBinAutomaticLimits = False

ChiSqBinExtendToPlusInfinity Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 345: RISK Object Library - Palisade Corporation

.ChiSqBinMinimum = 0

.ChiSqBinMaximum = 10

.ChiSqBinExtendToMinusInfinity = True

.ChiSqBinExtendToPlusInfinity = True

End With

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinAutomaticLimits Property | ChiSqBinCount Property | ChiSqBinExtendToMinusInfinity Property | ChiSqBinMaximum

Property | ChiSqBinMinimum Property

© Palisade Corporation. All Rights Reserved.

Page 346: RISK Object Library - Palisade Corporation

Description

For equal-interval chi-sq binning, controls the location of the right side of the last bin.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinMaximum() As Double

Remarks

This property only is relevant if ChiSqBinAutomaticLimits = False.

This property only is relevant if ChiSqBinArrangement = RiskEqualIntervals.

If ChiSqBinExtendToPlusInfinity = True, this property is actually the right side of the second to last bin, while the last bin extends from this value to +Infinity.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binning of 'MyFit' to use 4 bins with equally spaced intervals from 0 to 10:

Public Sub SpecifyEqualIntervalChiSqBins()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

With fitDefinition

.ChiSqBinArrangement = RiskEqualIntervals

.ChiSqBinCount = 4

.ChiSqBinAutomaticLimits = False

.ChiSqBinMinimum = 0

.ChiSqBinMaximum = 10

ChiSqBinMaximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 347: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinAutomaticLimits Property | ChiSqBinCount Property | ChiSqBinExtendToMinusInfinity Property

| ChiSqBinExtendToPlusInfinity Property | ChiSqBinMinimum Property

© Palisade Corporation. All Rights Reserved.

Page 348: RISK Object Library - Palisade Corporation

Description

For equal-interval chi-sq binning, controls the location of the left side of the first bin.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ChiSqBinMinimum() As Double

Remarks

This property only is relevant if ChiSqBinAutomaticLimits = False.

This property only is relevant if ChiSqBinArrangement = RiskEqualIntervals.

If ChiSqBinExtendToMinusInfinity = True, this property is actually the left side of the second bin, while the first bin extends from this -Infinity to this value.

Example

[[New Example] (Visual Basic)]

'Set the chi-sq binning of 'MyFit' to use 4 bins with equally spaced intervals from 0 to 10:

Public Sub SpecifyEqualIntervalChiSqBins()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

With fitDefinition

.ChiSqBinArrangement = RiskEqualIntervals

.ChiSqBinCount = 4

.ChiSqBinAutomaticLimits = False

.ChiSqBinMinimum = 0

.ChiSqBinMaximum = 10

ChiSqBinMinimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 349: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskFitDefinition Object | ChiSqBinArrangement Property | ChiSqBinAutomaticLimits Property | ChiSqBinCount Property | ChiSqBinExtendToMinusInfinity Property

| ChiSqBinExtendToPlusInfinity Property | ChiSqBinMaximum Property

© Palisade Corporation. All Rights Reserved.

Page 350: RISK Object Library - Palisade Corporation

Description

Specifies the Excel Range where the data being fit resides.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DataRange() As Range

Remarks

The data must reside in the same workbook specified in the ExcelWorkbook property.

The data range must be a contiguous block of cells.

The contents and layout of the data range depend on the DataType of the fit, as specified below:

RiskFitContinousSamples : A single rectangular block of cells.

RiskFitDiscreteSamples : A single rectangular block of cells containing only integer values.

RiskFitCountedDiscreteSamples : A block of cells with exactly two columns, both containing only integers. The first column contains the sample values. The second column contains

the number of occurrences of each sample value.

RiskFitUnnormalizedDensityPoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the y-values that define the density

curve.

RiskFitNormalizedDensityPoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the y-values that define the density

curve.

DataRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 351: RISK Object Library - Palisade Corporation

RiskFitCumulativePoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the p-values that define the cumulative curve.

Example

[[New Example] (Visual Basic)]

'Change the data range used in 'MyFit' to run from $A$1:$A$100 of the active sheet.

Public Sub ChangeFitDefinitionDataRange()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

Set fitDefinition.DataRange = Range( "A1:A100")

End Sub

See Also

RiskFitDefinition Object | ExcelWorkbook Property | DataType Property

© Palisade Corporation. All Rights Reserved.

Page 352: RISK Object Library - Palisade Corporation

Description

Specifies the type of data being fit.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DataType() As RiskFitDataType

Remarks

The arrangement and contents of the DataRange depends on this settings.

See Also

RiskFitDefinition Object | RiskFitDataType Enumeration

© Palisade Corporation. All Rights Reserved.

DataType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 353: RISK Object Library - Palisade Corporation

Description

Returns the Excel Workbook associated with the fit definition.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ExcelWorkbook() As Workbook

Remarks

While you can change the DataRange associated with a RiskFitDefinition object after it has been created, you must keep it within the same workbook it was originally created in.

Example

[[New Example] (Visual Basic)]

'Display some basic information about the the first fit definition if @RISK's collection of fits:

Public Sub DisplayFitDefinitionInformation()

Dim displayString As String

displayString = "Information about Fit Definition #1:" & vbCrLf

With Risk.Fits(1)

displayString = displayString & "Name = " & .Name & vbCrLf

displayString = displayString & "ExcelWorkbook = " & .ExcelWorkbook.Name & vbCrLf

displayString = displayString & "ExcelRange = " & .DataRange.Address

End With

MsgBox displayString

End Sub

See Also

ExcelWorkbook Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 354: RISK Object Library - Palisade Corporation

RiskFitDefinition Object | DataRange Property

© Palisade Corporation. All Rights Reserved.

Page 355: RISK Object Library - Palisade Corporation

Description

Controls the minimum value of an input filter that occurs on data before fitting takes place.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FilterMaximum() As Double

Remarks

This property only is relevant if the FilterType property is set to RiskFitFilterTypeAbsolute.

If a data point falls exactly on the FilterMaximum it will not be excluded from the fitting process.

You can set the FilterMaximum to the special value RiskPositiveInfinity to make a one sided filter (with FilterMinimum set to a finite value.)

Example

[[New Example] (Visual Basic)]

'Set up a fit for cell range A1:A1000 of the active sheet, but filter out any values that don't fall between 0 and 100.

Public Sub SetupFilteredFit()

Dim fitDefinition As RiskFitDefinition

'Create the new fit definition object:

Set fitDefinition = Risk.Fits.Add(Range("A1:A1000"), RiskFitContinousSamples, "MyFit")

'Set up the filter:

With fitDefinition

.FilterType = RiskFitFilterAbsolute

.FilterMinimum = 0

.FilterMaximum = 100

FilterMaximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 356: RISK Object Library - Palisade Corporation

End With

'Go on to perform the fit

'Etc...

End Sub

See Also

RiskFitDefinition Object | FilterType Property | FilterMinimum Property | FilterNumStdDeviations Property

© Palisade Corporation. All Rights Reserved.

Page 357: RISK Object Library - Palisade Corporation

Description

Controls the minimum value of an input filter that occurs on data before fitting takes place.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FilterMinimum() As Double

Remarks

This property only is relevant if the FilterType property is set to RiskFitFilterTypeAbsolute.

If a data point falls exactly on the FilterMinimum it will not be excluded from the fitting process.

You can set the FilterMinimum to the special value RiskNegativeInfinity to make a one sided filter (with FilterMaximum set to a finite value.)

Example

[[New Example] (Visual Basic)]

'Set up a fit for cell range A1:A1000 of the active sheet, but filter out any values that don't fall between 0 and 100.

Public Sub SetupFilteredFit()

Dim fitDefinition As RiskFitDefinition

'Create the new fit definition object:

Set fitDefinition = Risk.Fits.Add(Range("A1:A1000"), RiskFitContinousSamples, "MyFit")

'Set up the filter:

With fitDefinition

.FilterType = RiskFitFilterAbsolute

.FilterMinimum = 0

.FilterMaximum = 100

FilterMinimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 358: RISK Object Library - Palisade Corporation

End With

'Go on to perform the fit

'Etc...

End Sub

See Also

RiskFitDefinition Object | FilterType Property | FilterMaximum Property | FilterNumStdDeviations Property

© Palisade Corporation. All Rights Reserved.

Page 359: RISK Object Library - Palisade Corporation

Description

Controls the size of a relative input filter that occurs on data before fitting takes place.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FilterNumStdDeviations() As Double

Remarks

This property only is relevant if the FilterType property is set to RiskFitFilterTypeRelative.

The filter will exclude any data point that is further away (in either direction) than the specified number of standard deviations from the mean.

If a data point falls exactly on the filter boundary, it will not be excluded from the fitting process.

Example

[[New Example] (Visual Basic)]

'Set up a fit for range A1:A1000 of the active sheet, but filter out any values beyond 1.5 std. deviations from the mean.

Public Sub SetupRelativeFilterFit()

Dim fitDefinition As RiskFitDefinition

'Create the new fit definition object:

Set fitDefinition = Risk.Fits.Add(Range("A1:A1000"), RiskFitContinousSamples, "MyFit")

'Set up the filter:

With fitDefinition

.FilterType = RiskFitFilterRelative

.FilterNumStdDeviations = 1.5

End With

FilterNumStdDeviations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 360: RISK Object Library - Palisade Corporation

'Go on to perform the fit

'Etc...

End Sub

See Also

RiskFitDefinition Object | FilterType Property | FilterMinimum Property | FilterMaximum Property

© Palisade Corporation. All Rights Reserved.

Page 361: RISK Object Library - Palisade Corporation

Description

Controls what type of input filtering occurs on the data before fitting takes place.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FilterType() As RiskFitFilterType

Remarks

If this property is set to RiskFitFilterAbsolute, the FilterMinimum and FilterMaximum properties control the limits of the filtering. If this property is set to RiskFitFilterRelative, the

FilterNumStdDeviations property controls the number of standard deviations permitted by the filter.

Example

[[New Example] (Visual Basic)]

'Set up a fit for cell range A1:A1000 of the active sheet, but filter out any values that don't fall between 0 and 100.

Public Sub SetupFilteredFit()

Dim fitDefinition As RiskFitDefinition

'Create the new fit definition object:

Set fitDefinition = Risk.Fits.Add(Range("A1:A1000"), RiskFitContinousSamples, "MyFit")

'Set up the filter:

With fitDefinition

.FilterType = RiskFitFilterAbsolute

.FilterMinimum = 0

.FilterMaximum = 100

End With

FilterType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 362: RISK Object Library - Palisade Corporation

'Go on to perform the fit

'Etc...

End Sub

See Also

RiskFitDefinition Object | FilterMinimum Property | FilterMaximum Property | FilterNumStdDeviations Property | RiskFitFilterType Enumeration

© Palisade Corporation. All Rights Reserved.

Page 363: RISK Object Library - Palisade Corporation

Description

Controls whether fits are performed using mathematical estimation techniques or to predefined distributions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FitMethod() As RiskFitMethod

Remarks

If this property is set to RiskEstimatedParameters, the distribution types that can be set or retrieved using the EstimatedFitsGetList and EstimatedFitsSetList methods. In addition, the

nature and location of the boundary limits for these distributions can be controlled by the LowerLimitType, LowerLimitValue, UpperLimitType, and UpperLimitValue properties.

If this property is set to RiskPredefinedDistributions, the specific distributions to fit can be set or retrieved using the the PredefinedFitGetList and PredefinedSetList methods.

Example

[[New Example] (Visual Basic)]

'Fits to the data in A1:A100 (in the active sheet) for the Gamma, Lognorm, and Weibull distribution types, with a fixed lower bound of zero.

Public Sub PerformEstimatedFits()

Dim fitDefinition As RiskFitDefinition

Dim distributionTypes(1 To 3) As String

Dim fitResults As RiskFitResultCollection

Dim oneFitResult As RiskFitResult

Dim displayString As String

'Set up a new fit definition object with the correct data range, distribution types to fit, and limits:

Set fitDefinition = Risk.Fits.Add(Range("A1:A100"), RiskFitContinousSamples, "MyFitData")

With fitDefinition

.FitMethod = RiskEstimatedParameters

FitMethod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 364: RISK Object Library - Palisade Corporation

distributionTypes(1) = "Gamma"

distributionTypes(2) = "Lognorm"

distributionTypes(3) = "Weibull"

.EstimatedFitsSetList distributionTypes

.LowerLimitType = RiskFixedLimit

.LowerLimitValue = 0

.UpperLimitType = RiskOpenLimit

End With

'Actually perform the fit:

Set fitResults = fitDefinition.PerformFit

'Display the results of the fitting:

displayString = "Fit Results:" & vbCrLf

For Each oneFitResult In fitResults

If oneFitResult.ValidFit Then

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.DistributionFunction & vbCrLf

Else

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.InvalidFitDescription & vbCrLf

End If

Next

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | EstimatedFitsGetList Method | EstimatedFitsSetList Method | PredefinedFitsGetList Method | PredefinedFitsSetList Method | PerformFit Method

| LowerLimitType Property | LowerLimitValue Property | UpperLimitType Property | UpperLimitValue Property | RiskFitMethod Enumeration

© Palisade Corporation. All Rights Reserved.

Page 365: RISK Object Library - Palisade Corporation

Description

Specifies one or more fixed parameters for the fitting process.

Property type

Read-write property

Syntax (Visual Basic)

Public Property FixedParameter( _

ByVal p_WhichParameter As RiskFixedParameter _

) As Variant

Parameters

p_WhichParameter

Value Description

RiskBinomialN Binomial distribution number of trials.

RiskBinomialP Binomial distribution probability.

RiskHypergeoN Hypergeometric distribution number of trials.

RiskNegBinS Negative binomial distribution number of successes.

RiskGammaShape Gamma distribution shape (alpha) parameter.

RiskNormalMean Normal distribution mean (mu) parameter.

RiskNormalStdDev Normal distribution standard deviation (sigma) parameter.

RiskWeibullShape Weibull distribution shape (alpha) parameter.

Remarks

FixedParameter Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 366: RISK Object Library - Palisade Corporation

The fixed parameters are ignored unless the FixedParametersEnabled Property is True.

Example

[Visual Basic]

'Make the binomial and hypergeometic distributions both use fixed values n=10

Public Sub SetFixedParameters()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.Fits("My Fit")

fitDefinition.FixedParametersEnabled = True

fitDefinition.FixedParameter(RiskBinomialN) = 10

fitDefinition.FixedParameter(RiskHypergeoN) = 10

End Sub

See Also

RiskFitDefinition Object | FixedParametersEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 367: RISK Object Library - Palisade Corporation

Property type

Read-write property

Syntax (Visual Basic)

Public Property FixedParametersEnabled() As Boolean

Remarks

The values of the fixed parameters are specified using the FixedParameter Property.

Example

[Visual Basic]

'Make the binomial and hypergeometic distributions both use fixed values n=10

Public Sub SetFixedParameters()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.Fits("My Fit")

fitDefinition.FixedParametersEnabled = True

fitDefinition.FixedParameter(RiskBinomialN) = 10

fitDefinition.FixedParameter(RiskHypergeoN) = 10

End Sub

See Also

RiskFitDefinition Object | FixedParameter Property

FixedParametersEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 368: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 369: RISK Object Library - Palisade Corporation

Description

Controls the nature of the lower limits of distribution that are estimated during the fitting process.

Property type

Read-write property

Syntax (Visual Basic)

Public Property LowerLimitType() As RiskFitLimitType

Remarks

The property is only relevant if the FitMethod property is set to RiskEstimatedParameters.

If this property is set to RiskFixedLimit, the value of the fixed limit is specified in the LowerLimitValue property.

This property can be useful to apply a constraint to the fitting process. For example, if you fit a Gamma distribution leaving this property at its default value of RiskUnsureLimit, the fitting

process will use a 3-parameter Gamma (that is a Gamma where the lower limit, or shift, is adjustable). However, you may want to alway force this Gamma to have a lower limit of zero.

By setting this property to RiskFixedLimit and the LowerLimitType property to zero, you can accomplish this.

The UpperLimitValue property has the corresponding affect on the distribution upper limits. This, however, is much less commonly done.

Example

[[New Example] (Visual Basic)]

'Fits to the data in A1:A100 (in the active sheet) for the Gamma, Lognorm, and Weibull distribution types, with a fixed lower bound of zero.

Public Sub PerformEstimatedFits()

Dim fitDefinition As RiskFitDefinition

Dim distributionTypes(1 To 3) As String

Dim fitResults As RiskFitResultCollection

Dim oneFitResult As RiskFitResult

Dim displayString As String

'Set up a new fit definition object with the correct data range, distribution types to fit, and limits:

LowerLimitType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 370: RISK Object Library - Palisade Corporation

Set fitDefinition = Risk.Fits.Add(Range("A1:A100"), RiskFitContinousSamples, "MyFitData")

With fitDefinition

.FitMethod = RiskEstimatedParameters

distributionTypes(1) = "Gamma"

distributionTypes(2) = "Lognorm"

distributionTypes(3) = "Weibull"

.EstimatedFitsSetList distributionTypes

.LowerLimitType = RiskFixedLimit

.LowerLimitValue = 0

.UpperLimitType = RiskOpenLimit

End With

'Actually perform the fit:

Set fitResults = fitDefinition.PerformFit

'Display the results of the fitting:

displayString = "Fit Results:" & vbCrLf

For Each oneFitResult In fitResults

If oneFitResult.ValidFit Then

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.DistributionFunction & vbCrLf

Else

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.InvalidFitDescription & vbCrLf

End If

Next

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | FitMethod Property | LowerLimitValue Property | UpperLimitType Property | UpperLimitValue Property | RiskFitLimitType Enumeration

Page 371: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 372: RISK Object Library - Palisade Corporation

Description

Controls the fixed lower value for an estimated fit.

Property type

Read-write property

Syntax (Visual Basic)

Public Property LowerLimitValue() As Double

Remarks

This property is only relevant if the FitMethod property is set to RiskEstimatedParameters and LowerLimitType is set to RiskFixedLimit

This property can be useful to apply a constraint to the fitting process. For example, if you fit a Gamma distribution leaving the LowerLimitType and LowerLimitValue properties at their

default states, the fitting process will use a 3-parameter Gamma (that is a Gamma where the lower limit, or shift, is adjustable). However, you may want to alway force this Gamma to

have a lower limit of zero. By setting the LowerLimitType property to RiskFixedLimit and this property to zero, you can accomplish this.

The UpperLimitValue property has the corresponding affect on the distribution upper limits. This, however, is much less commonly done.

Example

[[New Example] (Visual Basic)]

'Fits to the data in A1:A100 (in the active sheet) for the Gamma, Lognorm, and Weibull distribution types, with a fixed lower bound of zero.

Public Sub PerformEstimatedFits()

Dim fitDefinition As RiskFitDefinition

Dim distributionTypes(1 To 3) As String

Dim fitResults As RiskFitResultCollection

Dim oneFitResult As RiskFitResult

Dim displayString As String

'Set up a new fit definition object with the correct data range, distribution types to fit, and limits:

Set fitDefinition = Risk.Fits.Add(Range("A1:A100"), RiskFitContinousSamples, "MyFitData")

LowerLimitValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 373: RISK Object Library - Palisade Corporation

With fitDefinition

.FitMethod = RiskEstimatedParameters

distributionTypes(1) = "Gamma"

distributionTypes(2) = "Lognorm"

distributionTypes(3) = "Weibull"

.EstimatedFitsSetList distributionTypes

.LowerLimitType = RiskFixedLimit

.LowerLimitValue = 0

.UpperLimitType = RiskOpenLimit

End With

'Actually perform the fit:

Set fitResults = fitDefinition.PerformFit

'Display the results of the fitting:

displayString = "Fit Results:" & vbCrLf

For Each oneFitResult In fitResults

If oneFitResult.ValidFit Then

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.DistributionFunction & vbCrLf

Else

displayString = displayString & "Fit " & oneFitResult.FitName & " --> " & oneFitResult.InvalidFitDescription & vbCrLf

End If

Next

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | FitMethod Property | LowerLimitType Property | UpperLimitType Property | UpperLimitValue Property

Page 374: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 375: RISK Object Library - Palisade Corporation

Description

Controls the name of the fit definition.

Property type

Read-write property

Syntax (Visual Basic)

Public Property Name() As String

Remarks

The fit name must be unique within the particular workbook where it is defined. That is, you can have two fit definitions with the same name, but only if they are located in two different

workbooks.

Example

[[New Example] (Visual Basic)]

'Displays the names of all fits, and which workbook they are located in.

Public Sub DisplayNamesOfAllFits()

Dim displayString As String

Dim fitDefinition As RiskFitDefinition

displayString = "There are " & Risk.Fits.Count & " fit definitions." & vbCrLf

For Each fitDefinition In Risk.Fits

displayString = displayString & fitDefinition.Name & " in workbook " & fitDefinition.ExcelWorkbook.Name & vbCrLf

Next

MsgBox displayString

End Sub

See Also

Name Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 376: RISK Object Library - Palisade Corporation

RiskFitDefinition Object | ExcelWorkbook Property

© Palisade Corporation. All Rights Reserved.

Page 377: RISK Object Library - Palisade Corporation

Description

Controls whether fits that are "questionable" from a meta-mathematical standpoint are suppressed from the fit results.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SuppressQuestionableFits() As Boolean

See Also

RiskFitDefinition Object

© Palisade Corporation. All Rights Reserved.

SuppressQuestionableFits Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 378: RISK Object Library - Palisade Corporation

Description

Controls the nature of the upper limits of distribution that are estimated during the fitting process.

Property type

Read-write property

Syntax (Visual Basic)

Public Property UpperLimitType() As RiskFitLimitType

Remarks

The property is only relevant if the FitMethod property is set to RiskEstimatedParameters.

If this property is set to RiskFixedLimit, the value of the fixed limit is specified in the UpperLimitValue property.

This property can be useful to apply a constraint to the fitting process. For example, if you fit a Triang distribution leaving this property at its default value of RiskUnsureLimit, the fitting

process will allow the upper limit of the triangular distribution to be adjustable during the fitting process. However, you may want to alway force this Triang to have an upper of 5. By

setting this property to RiskFixedLimit and the UpperLimitValue property to 5, you can accomplish this.

It is much more common to set a lower limit than an upper limit.

Example

[[New Example] (Visual Basic)]

'Fits to the data in A1:A100 (in the active sheet) with a Triang distribution with a fixed upper boundary of 5.

Public Sub FitTriangWithFixedUpperLimit()

Dim fitDefinition As RiskFitDefinition

Dim distributionTypes(1 To 1) As String

Dim fitResult As RiskFitResult

Dim displayString As String

'Set up a new fit definition object with the correct data range, distribution types to fit, and limits:

Set fitDefinition = Risk.Fits.Add(Range("A1:A100"), RiskFitContinousSamples, "MyFitData")

UpperLimitType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 379: RISK Object Library - Palisade Corporation

With fitDefinition

.FitMethod = RiskEstimatedParameters

distributionTypes(1) = "Triang"

.EstimatedFitsSetList distributionTypes

.UpperLimitType = RiskFixedLimit

.UpperLimitValue = 5

End With

'Actually perform the fit:

Set fitResult = fitDefinition.PerformFit(1)

'Display the result:

If fitResult.ValidFit Then

displayString = fitResult.DistributionFunction

Else

displayString = fitResult.InvalidFitDescription

End If

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | FitMethod Property | LowerLimitType Property | LowerLimitValue Property | UpperLimitValue Property | RiskFitLimitType Enumeration

© Palisade Corporation. All Rights Reserved.

Page 380: RISK Object Library - Palisade Corporation

Description

Controls the fixed upper value for an estimated fit.

Property type

Read-write property

Syntax (Visual Basic)

Public Property UpperLimitValue() As Double

Remarks

This property is only relevant if the FitMethod property is set to RiskEstimatedParameters and UpperLimitType is set to RiskFixedLimit

This property can be useful to apply a constraint to the fitting process. For example, if you fit a Triang distribution leaving this property and the UpperLimitType properties at their defaults,

the upper limit of the triangular distribution will be adjustable during the fitting process. However, you may want to alway force this Triang to have an upper of 5. By setting the

UpperLimitType property to RiskFixedLimit and this property to 5, you can accomplish this.

It is much more common to set a lower limit than an upper limit.

Example

[[New Example] (Visual Basic)]

'Fits to the data in A1:A100 (in the active sheet) with a Triang distribution with a fixed upper boundary of 5.

Public Sub FitTriangWithFixedUpperLimit()

Dim fitDefinition As RiskFitDefinition

Dim distributionTypes(1 To 1) As String

Dim fitResult As RiskFitResult

Dim displayString As String

'Set up a new fit definition object with the correct data range, distribution types to fit, and limits:

Set fitDefinition = Risk.Fits.Add(Range("A1:A100"), RiskFitContinousSamples, "MyFitData")

With fitDefinition

UpperLimitValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 381: RISK Object Library - Palisade Corporation

.FitMethod = RiskEstimatedParameters

distributionTypes(1) = "Triang"

.EstimatedFitsSetList distributionTypes

.UpperLimitType = RiskFixedLimit

.UpperLimitValue = 5

End With

'Actually perform the fit:

Set fitResult = fitDefinition.PerformFit(1)

'Display the result:

If fitResult.ValidFit Then

displayString = fitResult.DistributionFunction

Else

displayString = fitResult.InvalidFitDescription

End If

MsgBox displayString

End Sub

See Also

RiskFitDefinition Object | FitMethod Property | LowerLimitType Property | LowerLimitValue Property | UpperLimitType Property

© Palisade Corporation. All Rights Reserved.

Page 382: RISK Object Library - Palisade Corporation

Description

Controls whether fit data is in date format.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ValuesAreDates() As Boolean

Example

[Visual Basic]

'Change the data range used in 'MyFit' to run from $A$1:$A$100 of the active sheet,

'and be in date format

Public Sub ChangeFitDefinitionDataRange()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.fits("MyFit")

Set fitDefinition.DataRange = Range( "A1:A100")

fitDefinition.ValuesAreDates = True

End Sub

See Also

RiskFitDefinition Object | DataType Property | DataRange Property

© Palisade Corporation. All Rights Reserved.

ValuesAreDates Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 383: RISK Object Library - Palisade Corporation

Description

A collection of all RiskFitDefinitions associated with all open Excel workbooks.

For a list of all members defined in this module, see RiskFitDefinitionCollection members.

Object Model

See Also

RiskFitDefinitionCollection Members | RiskFitDefinition Object

© Palisade Corporation. All Rights Reserved.

RiskFitDefinitionCollection Collection

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 384: RISK Object Library - Palisade Corporation

Public Methods

Add Creates a new RiskFitDefinition object for a non-batch fit, and adds it to the collection.

AddBatch Creates a new RiskFitDefinition object for a batch fit, and adds it to the collection.

Count The number of fit definitions in the collection.

ReviewRiskFitDistributionFunction

Public Properties

Item Returns a single fit definition from the collection.

See Also

RiskFitDefinitionCollection Overview | RiskFitDefinition Object

© Palisade Corporation. All Rights Reserved.

RiskFitDefinitionCollection Collection Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 385: RISK Object Library - Palisade Corporation

Description

Creates a new RiskFitDefinition object for a non-batch fit, and adds it to the collection.

Syntax

Public Function Add( _

ByVal p_DataRange As Range, _

ByVal p_DataType As RiskFitDataType, _

Optional ByVal p_Name As String = "" _

) As RiskFitDefinition

Parameters

p_DataRange

The Excel range which contains the data to be fit.

The data range must be a contiguous block of cells.

The contents and layout of the data range depend on the DataType of the fit, as specified below:

RiskFitContinousSamples : A single rectangular block of cells.

RiskFitDiscreteSamples : A single rectangular block of cells containing only integer values.

RiskFitCountedDiscreteSamples : A block of cells with exactly two columns, both containing only integers. The first column contains the sample values. The second column

contains the number of occurrences of each sample value.

RiskFitUnnormalizedDensityPoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the y-values that define the

density curve.

RiskFitNormalizedDensityPoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the y-values that define the density

Add Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 386: RISK Object Library - Palisade Corporation

curve.

RiskFitCumulativePoints : A block of cells with exactly two columns. The first column contains x-values and the second column contains the p-values that define the cumulative

curve.

p_DataType

Value Description

RiskFitContinuousSamples The data are continuous.

RiskFitDiscreteSamples The data are discrete, integer values.

RiskFitCountedDiscreteSamples The data are discrete, integer values and must arranged in two columns. The first column contains the sample value. The

second column contains the number of samples at that value.

RiskFitUnnormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first column

contains the x-values, while the second contains the y-values. No normalization transformation is applied to the data before

fitting.

RiskFitNormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first column

contains the x-values, while the second contains the y-values. Before fitting occurs, the data is transformed so that the area

under the curve defined by the data (assuming linear extrapolation between data points) is equal to one.

RiskFitCumulativePoints The data are (x,p) points that define a continuous cumulative curve. The data must be arranged in two columns. The first

column contains the x-values, while the second contains the p-values.

p_Name

The name of the fit. This name must be unique within the particular workbook where the fit resides. Two fits may have the same name if they are associated with different

workbooks.

Remarks

Note: Adding a fit does not actuall perform the fit. You must call the newly created object's PerformFit method.

Note: This method adds a regular (non-batch) fit. To add a batch fit, use AddBatch Method.

Example

[[New Example] (Visual Basic)]

'Defines a new fit of continuous sample data residing in the range $A$1:$A$100 on the active sheet named 'MyFit'.

Page 387: RISK Object Library - Palisade Corporation

Public Sub DefineNewFit()

Risk.fits.Add Range("A1:A100"), RiskFitContinousSamples, "MyFit"

End Sub

See Also

RiskFitDefinitionCollection Collection | PerformFit Method | Delete Method | AddBatch Method

© Palisade Corporation. All Rights Reserved.

Page 388: RISK Object Library - Palisade Corporation

Description

Creates a new RiskFitDefinition object for a batch fit, and adds it to the collection.

Syntax

Public Function AddBatch( _

ByVal p_DataRange As Range, _

ByVal p_DataType As RiskFitDataType, _

Optional ByVal p_Name As String = "" _

) As RiskFitDefinition

Parameters

p_DataRange

The Excel range which contains the data to be fit.

The data range must be a contiguous block of cells, containing one or two columns of data for each fit in the batch.

The contents and layout of the data range depend on the DataType of the fit, as specified below:

RiskFitContinousSamples : One column per fit.

RiskFitDiscreteSamples : One column per fit, containing only integer values.

RiskFitCountedDiscreteSamples : Two columns per fit, both containing only integers. The first column for each fit contains the sample values. The second column contains the

number of occurrences of each sample value.

RiskFitUnnormalizedDensityPoints : Two columns per fit. The first column contains x-values and the second column contains the y-values that define the density curve.

RiskFitNormalizedDensityPoints : Two columns per fit. The first column contains x-values and the second column contains the y-values that define the density curve.

RiskFitCumulativePoints : Two columns per fit. The first column contains x-values and the second column contains the p-values that define the cumulative curve.

p_DataType

Value Description

RiskFitContinuousSamples The data are continuous.

AddBatch Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 389: RISK Object Library - Palisade Corporation

RiskFitDiscreteSamples The data are discrete, integer values.

RiskFitCountedDiscreteSamples The data are discrete, integer values and must arranged in two columns. The first column contains the sample value. The

second column contains the number of samples at that value.

RiskFitUnnormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first column

contains the x-values, while the second contains the y-values. No normalization transformation is applied to the data before

fitting.

RiskFitNormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first column

contains the x-values, while the second contains the y-values. Before fitting occurs, the data is transformed so that the area

under the curve defined by the data (assuming linear extrapolation between data points) is equal to one.

RiskFitCumulativePoints The data are (x,p) points that define a continuous cumulative curve. The data must be arranged in two columns. The first

column contains the x-values, while the second contains the p-values.

p_Name

The name of the fit. This name must be unique within the particular workbook where the fit resides. Two fits may have the same name if they are associated with different workbooks.

Remarks

Note: Adding a fit does not actuall perform the fit. You must call the newly created object's PerformFit method.

Note: This method adds a batch fit. To add a batch fit, use Add Method

Example

[Visual Basic]

Public Sub RunMacro()

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.Fits.AddBatch(ActiveSheet.Range("b2:h13"), RiskFitContinuousSamples, "MyBatch")

fitDefinition.PerformFit

End Sub

See Also

RiskFitDefinitionCollection Collection | Add Method

Page 390: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 391: RISK Object Library - Palisade Corporation

Description

The number of fit definitions in the collection.

Syntax

Public Function Count() As Long

See Also

RiskFitDefinitionCollection Collection

© Palisade Corporation. All Rights Reserved.

Count Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 392: RISK Object Library - Palisade Corporation

Syntax

Public Function ReviewRiskFitDistributionFunction( _

ByVal p_Cell As Range _

) As Boolean

Parameters

p_Cell

See Also

RiskFitDefinitionCollection Collection

© Palisade Corporation. All Rights Reserved.

ReviewRiskFitDistributionFunction Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 393: RISK Object Library - Palisade Corporation

Description

Returns a single fit definition from the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Item( _

ByVal p_Index As Variant _

) As RiskFitDefinition

Parameters

p_Index

This can be specified by name or by numerical index in the collection.

Remarks

If requesting a fit by name, be aware that if two fits have the same name (which can only occur if they are defined in two different workbooks) the one in the active Excel workbook will be

returned. If two names are the same and neither is in the active Excel workbook, which one is returned is not defined.

Note: This is the 'default' property of the collection and thus it does not need to be explicity specified. In other words, the two lines of code below are equivalent:

Set fitDefinition = Risk.Fits.Item("MyFit")

Set fitDefinition = Risk.Fits("MyFit")

Example

[[New Example] (Visual Basic)]

'Get the fit definition named 'MyFit'

Dim fitDefinition as RiskFitDefinition

Set fitDefinition = Risk.Fits("MyFit")

Item Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 394: RISK Object Library - Palisade Corporation

'Get the 3rd fit definition in the collection

Dim fitDefinition As RiskFitDefinition

Set fitDefinition = Risk.Fits(3)

See Also

RiskFitDefinitionCollection Collection | RiskFitDefinition Object

© Palisade Corporation. All Rights Reserved.

Page 395: RISK Object Library - Palisade Corporation

Description

Contains summary information about the input data of a fit.

For a list of all members defined in this module, see RiskFitInput members.

See Also

RiskFitInput Members

© Palisade Corporation. All Rights Reserved.

RiskFitInput Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 396: RISK Object Library - Palisade Corporation

Public Properties

Kurtosis Returns the kurtosis (4th standardized central moment) of the input data.

Maximum Returns the maximum value of the input data.

Mean Returns the mean of the input data.

Minimum Returns the minimum of the input data.

Mode Returns the (approximate) mode of the simulation result.

Name Returns the name of the input.

PToX Returns a percentile (x-value) for the fitted input.

Skewness Returns the skewness (3rd standardized central moment) of the input data.

StdDeviation Returns the standard deviation of the input data.

ValuesAreDates Indicates whether the fit input values are dates.

ValuesWereIgnored Indicates in any values were ignored when the input data was collected for fitting.

XToP Returns the fraction of input probability that occurs at or below the specified value.

See Also

RiskFitInput Overview

© Palisade Corporation. All Rights Reserved.

RiskFitInput Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 397: RISK Object Library - Palisade Corporation

Description

Returns the kurtosis (4th standardized central moment) of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Kurtosis() As Double

Remarks

There are two different definitions commonly used by statisticians for kurtosis, which differ from each other by 3. The one used by @RISK gives the normal distribution a kurtosis of 3 and

not 0.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

Kurtosis Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 398: RISK Object Library - Palisade Corporation

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 399: RISK Object Library - Palisade Corporation

Description

Returns the maximum value of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Maximum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Maximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 400: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 401: RISK Object Library - Palisade Corporation

Description

Returns the mean of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mean() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Mean Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 402: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Maximum Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 403: RISK Object Library - Palisade Corporation

Description

Returns the minimum of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Minimum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Minimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 404: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 405: RISK Object Library - Palisade Corporation

Description

Returns the (approximate) mode of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mode() As Double

Remarks

The mode of a set of continuous sample data is not easily calculated. For data of this type, the result returned here is only an approximation.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

Mode Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 406: RISK Object Library - Palisade Corporation

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Maximum Property | Mean Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 407: RISK Object Library - Palisade Corporation

Description

Returns the name of the input.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Name() As String

Remarks

The name comes from the name assigned to the FitDefinition object.

See Also

RiskFitInput Object

© Palisade Corporation. All Rights Reserved.

Name Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 408: RISK Object Library - Palisade Corporation

Description

Returns a percentile (x-value) for the fitted input.

Property type

Read-only property

Syntax (Visual Basic)

Public Property PToX( _

ByVal p_PValue As Double _

) As Double

Parameters

p_PValue

The p-value (a number between 0 and 1) for which to return the corresponding x-value.

Remarks

PToX calculates the value of the result (the "x-value") such that the specified percentage of the input data are at that x-value or less.

The XToP method performs the opposite operation, and returns the percentage of input data that fall at or below the specified x-value.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the 10th, 50th, and 90th percentiles of the the input data and normal fit for 'MyFitData'.

Public Sub DisplayFitComparisonPercentiles()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

PToX Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 409: RISK Object Library - Palisade Corporation

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison of Percentiles of Input vs. Fit:" & vbCrLf

displayString = displayString & "10%" & vbTab & fitInput.PToX(0.1) & " <--> " & fitResult.PToX(0.1) & vbCrLf

displayString = displayString & "50%" & vbTab & fitInput.PToX(0.5) & " <--> " & fitResult.PToX(0.5) & vbCrLf

displayString = displayString & "90%" & vbTab & fitInput.PToX(0.9) & " <--> " & fitResult.PToX(0.9) & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | XToP Property | RiskNegativeInfinity Property | RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 410: RISK Object Library - Palisade Corporation

Description

Returns the skewness (3rd standardized central moment) of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Skewness() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Skewness Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 411: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 412: RISK Object Library - Palisade Corporation

Description

Returns the standard deviation of the input data.

Property type

Read-only property

Syntax (Visual Basic)

Public Property StdDeviation() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] ()]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits("MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

StdDeviation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 413: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | Minimum Property | Maximum Property | Mean Property | Mode Property | Skewness Property | Kurtosis Property | RiskNegativeInfinity Property

| RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 414: RISK Object Library - Palisade Corporation

Description

Indicates whether the fit input values are dates.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ValuesAreDates() As Boolean

See Also

RiskFitInput Object

© Palisade Corporation. All Rights Reserved.

ValuesAreDates Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 415: RISK Object Library - Palisade Corporation

Description

Indicates in any values were ignored when the input data was collected for fitting.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ValuesWereIgnored() As Boolean

Remarks

Data is ignored if it is non-numeric (string values), errors (#VALUE!, etc.), or blank cells.

Example

[[New Example] (Visual Basic)]

'Fit the data set 'MyFitData' and report back whether any values were ingored in the input data or not:

Public Sub ReportIgnoredValues()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

If fitInput.ValuesWereIgnored Then

displayString = "Values were ignored in the input data."

Else

displayString = "There were no ignored values in the input data."

End If

ValuesWereIgnored Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 416: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskFitInput Object

© Palisade Corporation. All Rights Reserved.

Page 417: RISK Object Library - Palisade Corporation

Description

Returns the fraction of input probability that occurs at or below the specified value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property XToP( _

ByVal p_XValue As Double _

) As Double

Parameters

p_XValue

The x-value for which to return the corresponding p-value.

Remarks

XToP calculates the fraction of input probability (the 'p-value') that falls below the specified 'x-value'.

The PToX method performs the opposite operation, and returns the x-value which has the specified fraction of probability at or below it.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the fraction of input data that occurs at or below 0 for the input data 'MyFitData'

'and compare this with the same fraction for the fitted normal.

Public Sub DisplayInputDataNegativeFraction()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

XToP Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 418: RISK Object Library - Palisade Corporation

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Fraction of probability at or below zero:" & vbCrLf

displayString = displayString & "Input Data = " & fitInput.XToP(0) & vbCrLf

displayString = displayString & "Normal Fit = " & fitResult.XToP(0) & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitInput Object | PToX Property | RiskNegativeInfinity Property | RiskPositiveInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 419: RISK Object Library - Palisade Corporation

Description

Contains information about a fitted distribution parameter.

For a list of all members defined in this module, see RiskFitParameter members.

See Also

RiskFitParameter Members

© Palisade Corporation. All Rights Reserved.

RiskFitParameter Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 420: RISK Object Library - Palisade Corporation

Public Properties

ConfidenceIntervalWidth Returns the width of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of the fit.

ConfidenceLevel Returns the cofidence level used in the bootstrap analysis of the fitted parameter.

ConfidenceLowerLimit Returns the lower limit of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of

the fit.

ConfidenceUpperLimit Returns the upper limit of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of

the fit.

FitValue Returns the fitted value of the parameter.

FitValueIsEstimated Returns if the fitting process determined the fitted value of this parameter, as opposed to it being a specified, fixed value.

Index Returns the index of the parameter in the distribution argument list.

IsDate Returns if the parameter is a date value.

isDiscrete Returns if the parameter is an integer value.

Name Returns the name of the fitted parameter.

See Also

RiskFitParameter Overview

© Palisade Corporation. All Rights Reserved.

RiskFitParameter Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 421: RISK Object Library - Palisade Corporation

Description

Returns the width of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ConfidenceIntervalWidth() As Double

Remarks

The value will be the special value RiskNaN if the bootstrap was not performed, or failed to run successfully.

See Also

RiskFitParameter Object | ConfidenceLevel Property | ConfidenceLowerLimit Property | ConfidenceUpperLimit Property

© Palisade Corporation. All Rights Reserved.

ConfidenceIntervalWidth Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 422: RISK Object Library - Palisade Corporation

Description

Returns the cofidence level used in the bootstrap analysis of the fitted parameter.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ConfidenceLevel() As Double

Remarks

The value is between 0 and 1.

See Also

RiskFitParameter Object | ConfidenceIntervalWidth Property | ConfidenceLowerLimit Property | ConfidenceUpperLimit Property

© Palisade Corporation. All Rights Reserved.

ConfidenceLevel Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 423: RISK Object Library - Palisade Corporation

Description

Returns the lower limit of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ConfidenceLowerLimit() As Double

Remarks

The value will be the special value RiskNaN if the bootstrap was not performed, or failed to run successfully.

See Also

RiskFitParameter Object | ConfidenceIntervalWidth Property | ConfidenceLevel Property | ConfidenceUpperLimit Property

© Palisade Corporation. All Rights Reserved.

ConfidenceLowerLimit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 424: RISK Object Library - Palisade Corporation

Description

Returns the upper limit of the confidence interval of the fitted parameter, based on the parametric bootstrap analysis of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ConfidenceUpperLimit() As Double

Remarks

The value will be the special value RiskNaN if the bootstrap was not performed, or failed to run successfully.

See Also

RiskFitParameter Object | ConfidenceIntervalWidth Property | ConfidenceLevel Property | ConfidenceLowerLimit Property

© Palisade Corporation. All Rights Reserved.

ConfidenceUpperLimit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 425: RISK Object Library - Palisade Corporation

Description

Returns the fitted value of the parameter.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FitValue() As Double

Remarks

The FitValueIsEstimated Property specifies if this value was actually estimated as part of the fitting process, instead of being a fixed value.

See Also

RiskFitParameter Object | FitValueIsEstimated Property

© Palisade Corporation. All Rights Reserved.

FitValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 426: RISK Object Library - Palisade Corporation

Description

Returns if the fitting process determined the fitted value of this parameter, as opposed to it being a specified, fixed value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FitValueIsEstimated() As Boolean

Remarks

The actual fitted value is returned in the FitValue Property.

See Also

RiskFitParameter Object | FitValue Property

© Palisade Corporation. All Rights Reserved.

FitValueIsEstimated Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 427: RISK Object Library - Palisade Corporation

Description

Returns the index of the parameter in the distribution argument list.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Index() As Long

Remarks

A value of 0 indicates a "shift factor" which is not in standard list of @RISK distribution parameters.

See Also

RiskFitParameter Object

© Palisade Corporation. All Rights Reserved.

Index Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 428: RISK Object Library - Palisade Corporation

Description

Returns if the parameter is a date value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property IsDate() As Boolean

See Also

RiskFitParameter Object

© Palisade Corporation. All Rights Reserved.

IsDate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 429: RISK Object Library - Palisade Corporation

Description

Returns if the parameter is an integer value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property isDiscrete() As Boolean

See Also

RiskFitParameter Object

© Palisade Corporation. All Rights Reserved.

isDiscrete Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 430: RISK Object Library - Palisade Corporation

Description

Returns the name of the fitted parameter.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Name() As String

See Also

RiskFitParameter Object

© Palisade Corporation. All Rights Reserved.

Name Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 431: RISK Object Library - Palisade Corporation

Description

A collection of RiskFitParameter Objects, describing the parameters of a fitted distribution.

For a list of all members defined in this module, see RiskFitParameterCollection members.

Object Model

See Also

RiskFitParameterCollection Members

© Palisade Corporation. All Rights Reserved.

RiskFitParameterCollection Collection

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 432: RISK Object Library - Palisade Corporation

Public Properties

Count The number of items in the collection.

Item Returns the specified parameter

NumEstimated Returns the number of parameters that were actually estimated in the fitting process, excluding any fixed parameters.

See Also

RiskFitParameterCollection Overview

© Palisade Corporation. All Rights Reserved.

RiskFitParameterCollection Collection Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 433: RISK Object Library - Palisade Corporation

Description

The number of items in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Count() As Integer

See Also

RiskFitParameterCollection Collection

© Palisade Corporation. All Rights Reserved.

Count Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 434: RISK Object Library - Palisade Corporation

Description

Returns the specified parameter

Property type

Read-only property

Syntax (Visual Basic)

Public Property Item( _

ByVal p_Index As Long _

) As RiskFitParameter

Parameters

p_Index

The index runs from 1 to the number of standard distribution arguments. The special value 0 can be used for a fitted "shift factor".

See Also

RiskFitParameterCollection Collection

© Palisade Corporation. All Rights Reserved.

Item Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 435: RISK Object Library - Palisade Corporation

Description

Returns the number of parameters that were actually estimated in the fitting process, excluding any fixed parameters.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumEstimated() As Integer

See Also

RiskFitParameterCollection Collection

© Palisade Corporation. All Rights Reserved.

NumEstimated Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 436: RISK Object Library - Palisade Corporation

Description

The results of a single distribution fitting operation.

For a list of all members defined in this module, see RiskFitResult members.

See Also

RiskFitResult Members

© Palisade Corporation. All Rights Reserved.

RiskFitResult Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 437: RISK Object Library - Palisade Corporation

Public Methods

ChiSqBinInformation Returns detailed information about a specific chi-sq test bin.

Public Properties

ChiSqNumBins Returns the number of chi-sq bins for the chi-square goodness-of-fit test.

DistributionFunction Returns the fitted distribution function US/English format.

DistributionFunctionLocal Returns the fitted distribution function local format.

FitName Returns the name of the fit.

InvalidFitDescription Provides a textual description of why a fit was unsuccessful.

Kurtosis Returns the kurtosis (4th standardized central moment) of the fitted distribution.

Maximum Returns the maximum value of the fitted distribution.

Mean Returns the mean of the fitted distribution.

Minimum Returns the minimum of the fitted distribution.

Mode Returns the mode of the fitted distribution.

PToX Returns a percentile (x-value) for the fitted distribution.

Skewness Returns the skewness (3rd standardized central moment) of the fitted distribution.

StdDeviation Returns the standard deviation of the fitted distribution.

ValidFit Indicates whether the fit was successful.

RiskFitResult Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 438: RISK Object Library - Palisade Corporation

ValuesAreDates Indicates whether the fit result values are dates.

XToP Returns the fraction of fitted distribution probability that occurs at or below the specified value.

See Also

RiskFitResult Overview

© Palisade Corporation. All Rights Reserved.

Page 439: RISK Object Library - Palisade Corporation

Description

Returns detailed information about a specific chi-sq test bin.

Syntax

Public Function ChiSqBinInformation( _

ByVal p_BinIndex As Integer _

) As RiskChiSqBinInformation

Parameters

p_BinIndex

A value between 1 and the number of bins (available in the ChiSqNumBins property) indicating which bin to return information for.

Remarks

The chi-squared goodness-of-fit test is only calculated for fit of sample data, either continous or discrete.

The ChiSqNumBins property returns the number of bins.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the chi-sq binning information for the normal fit results:

Public Sub DisplayChiSqBinningInformation()

Dim displayString As String

Dim fitResults As RiskFitResultCollection

Dim normalFit As RiskFitResult

Dim binInfo As RiskChiSqBinInformation

Dim i As Integer

Set fitResults = Risk.Fits("MyFit").PerformFit

Set normalFit = fitResults("Normal")

ChiSqBinInformation Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 440: RISK Object Library - Palisade Corporation

If normalFit.ValidFit Then

displayString = "Normal fit binning information." & vbCrLf

displayString = "# Chi-Sq Bins = " & normalFit.ChiSqNumBins & vbCrLf

For i = 1 To normalFit.ChiSqNumBins

binInfo = normalFit.ChiSqBinInformation(i)

displayString = displayString & "Bin #" & i & " : " & "Input = " & binInfo.InputOccupation & " Fit = " & binInfo.FitOccupation & vbCrLf

Next i

Else

displayString = "The normal fit was not valid."

End If

MsgBox displayString

End Sub

See Also

RiskFitResult Object | ChiSqNumBins Property | RiskChiSqBinInformation Structure | RiskChiSqBinInformation Structure

© Palisade Corporation. All Rights Reserved.

Page 441: RISK Object Library - Palisade Corporation

Description

Returns the number of chi-sq bins for the chi-square goodness-of-fit test.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ChiSqNumBins() As Integer

Remarks

The chi-squared goodness-of-fit test is only calculated for fit of sample data, either continous or discrete.

The ChiSqBinInformation method returns detailed information about each bin.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the chi-sq binning information for the normal fit results:

Public Sub DisplayChiSqBinningInformation()

Dim displayString As String

Dim fitResults As RiskFitResultCollection

Dim normalFit As RiskFitResult

Dim binInfo As RiskChiSqBinInformation

Dim i As Integer

Set fitResults = Risk.Fits("MyFit").PerformFit

Set normalFit = fitResults("Normal")

If normalFit.ValidFit Then

displayString = "Normal fit binning information." & vbCrLf

ChiSqNumBins Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 442: RISK Object Library - Palisade Corporation

displayString = "# Chi-Sq Bins = " & normalFit.ChiSqNumBins & vbCrLf

For i = 1 To normalFit.ChiSqNumBins

binInfo = normalFit.ChiSqBinInformation(i)

displayString = displayString & "Bin #" & i & " : " & "Input = " & binInfo.InputOccupation & " Fit = " & binInfo.FitOccupation & vbCrLf

Next i

Else

displayString = "The normal fit was not valid."

End If

MsgBox displayString

End Sub

See Also

RiskFitResult Object | ChiSqBinInformation Method

© Palisade Corporation. All Rights Reserved.

Page 443: RISK Object Library - Palisade Corporation

Description

Returns the fitted distribution function US/English format.

Property type

Read-only property

Syntax (Visual Basic)

Public Property DistributionFunction() As String

Remarks

If the fitting process failed, this string will be blank.

This property returns the distribution in US/English format. If you need the same function in the current user's locale, use the DistributionFunctionLocal property instead.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the Normal distribution that was fit in US and in local format.

Public Sub DisplayDistributionFunctions()

Dim fitResults As RiskFitResultCollection

Dim displayString As String

Set fitResults = Risk.Fits("MyFit").PerformFit

displayString = "Normal fit:" & vbCrLf

With fitResults("Normal")

If .ValidFit Then

displayString = displayString & "US/English Format : " & .DistributionFunction & vbCrLf

displayString = displayString & "Local Format : " & .DistributionFunctionLocal & vbCrLf

Else

DistributionFunction Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 444: RISK Object Library - Palisade Corporation

displayString = displayString & "Invalid Fit." & vbCrLf

End If

End With

MsgBox displayString

End Sub

See Also

RiskFitResult Object | DistributionFunctionLocal Property | ValidFit Property

© Palisade Corporation. All Rights Reserved.

Page 445: RISK Object Library - Palisade Corporation

Description

Returns the fitted distribution function local format.

Property type

Read-only property

Syntax (Visual Basic)

Public Property DistributionFunctionLocal() As String

Remarks

If the fitting process failed, this string will be blank.

This property returns the distribution in local format. If you need the same function in the US/English format, use the DistributionFunction property instead.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the Normal distribution that was fit in US and in local format.

Public Sub DisplayDistributionFunctions()

Dim fitResults As RiskFitResultCollection

Dim displayString As String

Set fitResults = Risk.Fits("MyFit").PerformFit

displayString = "Normal fit:" & vbCrLf

With fitResults("Normal")

If .ValidFit Then

displayString = displayString & "US/English Format : " & .DistributionFunction & vbCrLf

displayString = displayString & "Local Format : " & .DistributionFunctionLocal & vbCrLf

Else

DistributionFunctionLocal Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 446: RISK Object Library - Palisade Corporation

displayString = displayString & "Invalid Fit." & vbCrLf

End If

End With

MsgBox displayString

End Sub

See Also

RiskFitResult Object | DistributionFunction Property | ValidFit Property

© Palisade Corporation. All Rights Reserved.

Page 447: RISK Object Library - Palisade Corporation

Description

Returns the name of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FitName() As String

Remarks

For an estimated parameter fit, this will be the name of the distribution type. For a predefined distribution fit, this will be the name specified for that particular fit.

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

FitName Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 448: RISK Object Library - Palisade Corporation

Description

Provides a textual description of why a fit was unsuccessful.

Property type

Read-only property

Syntax (Visual Basic)

Public Property InvalidFitDescription() As String

Remarks

This property will be blank if the fit was successful.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the Gamma distribution that was fit.

'If the fit was invalid, display why.

Public Sub CheckForInvalidFit()

Dim fitResults As RiskFitResultCollection

Dim displayString As String

Set fitResults = Risk.Fits("MyFit").PerformFit

With fitResults("Gamma")

If .ValidFit Then

displayString = .DistributionFunction

Else

displayString = "Gamma was not a valid fit." & vbCrLf & .InvalidFitDescription

End If

End With

InvalidFitDescription Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 449: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskFitResult Object | ValidFit Property

© Palisade Corporation. All Rights Reserved.

Page 450: RISK Object Library - Palisade Corporation

Description

Returns the kurtosis (4th standardized central moment) of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Kurtosis() As Double

Remarks

There are two different definitions commonly used by statisticians for kurtosis, which differ from each other by 3. The one used by @RISK gives the normal distribution a kurtosis of 3 and

not 0.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

Kurtosis Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 451: RISK Object Library - Palisade Corporation

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 452: RISK Object Library - Palisade Corporation

Description

Returns the maximum value of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Maximum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Maximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 453: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 454: RISK Object Library - Palisade Corporation

Description

Returns the mean of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mean() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Mean Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 455: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 456: RISK Object Library - Palisade Corporation

Description

Returns the minimum of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Minimum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Minimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 457: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 458: RISK Object Library - Palisade Corporation

Description

Returns the mode of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mode() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Mode Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 459: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 460: RISK Object Library - Palisade Corporation

Description

Returns a percentile (x-value) for the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property PToX( _

ByVal p_PValue As Double _

) As Double

Parameters

p_PValue

The p-value (a number between 0 and 1) for which to return the corresponding x-value.

Remarks

PToX calculates the value of the result (the "x-value") such that the specified percentage of the fitted distribution are at that x-value or less.

The XToP method performs the opposite operation, and returns the percentage of values that fall at or below the specified x-value.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

PToX Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 461: RISK Object Library - Palisade Corporation

Description

Returns the skewness (3rd standardized central moment) of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Skewness() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

Skewness Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 462: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 463: RISK Object Library - Palisade Corporation

Description

Returns the standard deviation of the fitted distribution.

Property type

Read-only property

Syntax (Visual Basic)

Public Property StdDeviation() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[Visual Basic]

'Display a comparison of the statistic of the input and the normal distribution fit for 'MyFitData'.

Public Sub DisplayFitComparisonStatistics()

Dim displayString As String

Dim fitResultCollection As RiskFitResultCollection

Dim fitInput As RiskFitInput

Dim fitResult As RiskFitResult

Set fitResultCollection = Risk.Fits( "MyFitData").PerformFit

Set fitInput = fitResultCollection.fitInput

Set fitResult = fitResultCollection("Normal")

displayString = "Comparison Statistics of Input vs Fit:" & vbCrLf

displayString = displayString & "Min" & vbTab & fitInput.Minimum & " <--> " & fitResult.Minimum & vbCrLf

displayString = displayString & "Max" & vbTab & fitInput.Maximum & " <--> " & fitResult.Maximum & vbCrLf

displayString = displayString & "Mean" & vbTab & fitInput.Mean & " <--> " & fitResult.Mean & vbCrLf

StdDeviation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 464: RISK Object Library - Palisade Corporation

displayString = displayString & "Mode" & vbTab & fitInput.Mode & " <--> " & fitResult.Mode & vbCrLf

displayString = displayString & "S.D." & vbTab & fitInput.StdDeviation & " <--> " & fitResult.StdDeviation & vbCrLf

displayString = displayString & "Skew" & vbTab & fitInput.Skewness & " <--> " & fitResult.Skewness & vbCrLf

displayString = displayString & "Kurt" & vbTab & fitInput.Kurtosis & " <--> " & fitResult.Kurtosis & vbCrLf

MsgBox displayString

End Sub

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

Page 465: RISK Object Library - Palisade Corporation

Description

Indicates whether the fit was successful.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ValidFit() As Boolean

Remarks

A fit can be unsuccessful for a variety of reasons. A textual description of the reason a fit failed can be gotten from the InvalidFitDescription property.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the Gamma distribution that was fit.

'If the fit was invalid, display why.

Public Sub CheckForInvalidFit()

Dim fitResults As RiskFitResultCollection

Dim displayString As String

Set fitResults = Risk.Fits("MyFit").PerformFit

With fitResults("Gamma")

If .ValidFit Then

displayString = .DistributionFunction

Else

displayString = "Gamma was not a valid fit." & vbCrLf & .InvalidFitDescription

End If

End With

ValidFit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 466: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskFitResult Object | InvalidFitDescription Property

© Palisade Corporation. All Rights Reserved.

Page 467: RISK Object Library - Palisade Corporation

Description

Indicates whether the fit result values are dates.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ValuesAreDates() As Boolean

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

ValuesAreDates Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 468: RISK Object Library - Palisade Corporation

Description

Returns the fraction of fitted distribution probability that occurs at or below the specified value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property XToP( _

ByVal p_XValue As Double _

) As Double

Parameters

p_XValue

The x-value for which to return the corresponding p-value.

Remarks

XToP calculates the fraction of probability (the 'p-value') that falls below the specified 'x-value'.

The PToX method performs the opposite operation, and returns the x-value which has the specified fraction of probability at or below it.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

See Also

RiskFitResult Object

© Palisade Corporation. All Rights Reserved.

XToP Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 469: RISK Object Library - Palisade Corporation

Description

A collection of RISKFitResult objects, produced by performing a distribution fitting operation.

For a list of all members defined in this module, see RiskFitResultCollection members.

Object Model

See Also

RiskFitResultCollection Members

© Palisade Corporation. All Rights Reserved.

RiskFitResultCollection Collection

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 470: RISK Object Library - Palisade Corporation

Public Properties

BestFit Returns the fit result with the best (lowest value) fit statistic of the specified type.

Count Returns the number of fits in the collection.

CountValid Returns the number of fits in the collection that are valid.

FitInput Returns a RiskFitInput object, containing summary information about the input data that was being fit to.

Item Returns a single fit result from the collection.

See Also

RiskFitResultCollection Overview

© Palisade Corporation. All Rights Reserved.

RiskFitResultCollection Collection Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 471: RISK Object Library - Palisade Corporation

Description

Returns the fit result with the best (lowest value) fit statistic of the specified type.

Property type

Read-only property

Syntax (Visual Basic)

Public Property BestFit( _

ByVal p_Statistic As RiskFitStatistic _

) As RiskFitResult

Parameters

p_Statistic

Value Description

RiskChiSqStatistic The Chi-Square statistic. Often abbreviated Chi-Sq in @RISK.

RiskKolmogorovSmirnovStatistic The Kolmogorov-Smirnov statistic. Often abbreviated K-S in @RISK.

RiskAndersonDarlingStatistic The Anderson-Darling statistic. Often abbreviated A-D in @RISK.

RiskRMSErrorStatistic The Root-Mean Squared Error statistic. Often abbreviated RMSErr in @RISK.

RiskAIC Akaike Information Criterion.

RiskBIC Bayesian Information Criterion.

Remarks

The function will return a Null reference (Nothing) if the test statistics for all the fit results in the collection are invalid.

Example

BestFit Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 472: RISK Object Library - Palisade Corporation

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the best fitting distributions based on the Chi-Sq, A-D, and K-S tests.

Public Sub DisplayBestFits()

Dim displayString as String

Dim fitResults As RiskFitResultCollection

Dim theResult As RiskFitResult

Set fitResults = Risk.Fits("MyFitData").PerformFit

displayString = "Fit Results for MyFitData:" & vbCrLf

Set theResult = fitResults.BestFit(RiskChiSqStatistic)

If (theResult Is Nothing) Then

displayString = displayString & "ChiSq: No Fits With Valid Statistic" & vbCrLf

Else

displayString = displayString & "ChiSq: " & theResult.DistributionFunction & vbCrLf

End If

Set theResult = fitResults.BestFit(RiskAndersonDarlingStatistic)

If (theResult Is Nothing) Then

displayString = displayString & "A-D: No Fits With Valid Statistic" & vbCrLf

Else

displayString = displayString & "A-D: " & theResult.DistributionFunction & vbCrLf

End If

Set theResult = fitResults.BestFit(RiskKolmogorovSmirnovStatistic)

If (theResult Is Nothing) Then

displayString = displayString & "K-S: No Fits With Valid Statistic" & vbCrLf

Else

displayString = displayString & "K-S: " & theResult.DistributionFunction & vbCrLf

End If

Page 473: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskFitResultCollection Collection | Item Property

© Palisade Corporation. All Rights Reserved.

Page 474: RISK Object Library - Palisade Corporation

Description

Returns the number of fits in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Count() As Integer

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the number of fits that were performs and how many of them were valid.

Public Sub DisplayFitResultCounts()

Dim displayString As String

Dim fitResults As RiskFitResultCollection

Dim theResult As RiskFitResult

Set fitResults = Risk.Fits("MyFitData").PerformFit

displayString = "Number of Fits Performed = " & fitResults.Count & vbCrLf

displayString = displayString & "Number of Valid Fits = " & fitResults.CountValid

MsgBox displayString

End Sub

See Also

RiskFitResultCollection Collection | CountValid Property | Item Property

Count Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 475: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 476: RISK Object Library - Palisade Corporation

Description

Returns the number of fits in the collection that are valid.

Property type

Read-only property

Syntax (Visual Basic)

Public Property CountValid() As Integer

Remarks

The total number of fits in the collection, including valid and invalid fits, can be gotten from the Count property.

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the number of fits that were performs and how many of them were valid.

Public Sub DisplayFitResultCounts()

Dim displayString As String

Dim fitResults As RiskFitResultCollection

Dim theResult As RiskFitResult

Set fitResults = Risk.Fits("MyFitData").PerformFit

displayString = "Number of Fits Performed = " & fitResults.Count & vbCrLf

displayString = displayString & "Number of Valid Fits = " & fitResults.CountValid

MsgBox displayString

End Sub

See Also

CountValid Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 477: RISK Object Library - Palisade Corporation

RiskFitResultCollection Collection | Count Property | Item Property | ValidFit Property | InvalidFitDescription Property

© Palisade Corporation. All Rights Reserved.

Page 478: RISK Object Library - Palisade Corporation

Description

Returns a RiskFitInput object, containing summary information about the input data that was being fit to.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FitInput() As RiskFitInput

See Also

RiskFitResultCollection Collection

© Palisade Corporation. All Rights Reserved.

FitInput Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 479: RISK Object Library - Palisade Corporation

Description

Returns a single fit result from the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Item( _

ByVal p_Index As Variant _

) As RiskFitResult

Parameters

p_Index

This can be specified as a string (the name of the fit - usually the name of the distribution type) or by numerical index in the collection.

Remarks

Note: This is the 'default' property of the collection and thus it does not need to be explicity specified. In other words, the two lines of code below are equivalent:

Set fitResult = MyFitResultCollection.Item("Normal")

Set fitResult = MyFitResultCollection("Normal")

Example

[[New Example] (Visual Basic)]

'Do a fit of 'MyFitData' and display the Normal distribution that was fit.

Public Sub GetNormalFit()

Dim fitResults As RiskFitResultCollection

Set fitResults = Risk.Fits("MyFitData").PerformFit

With fitResults("Normal")

Item Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 480: RISK Object Library - Palisade Corporation

If .ValidFit Then

MsgBox "The normal fit was " & .DistributionFunction

Else

MsgBox "Normal was not a valid fit."

End If

End With

End Sub

See Also

RiskFitResultCollection Collection | BestFit Property | Count Property

© Palisade Corporation. All Rights Reserved.

Page 481: RISK Object Library - Palisade Corporation

Description

Contains information about a fit test statisic.

For a list of all members defined in this module, see RiskFitTestStatistic members.

See Also

RiskFitTestStatistic Members

© Palisade Corporation. All Rights Reserved.

RiskFitTestStatistic Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 482: RISK Object Library - Palisade Corporation

Public Properties

CriticalValue Returns the critical value of the test statistic based of the results of the parametric bootstrap analysis of the fit.

FitStatisticType Returns the type of fit statistic.

PValue Returns the P-Value of the test statistic, based of the results of the parametric bootstrap analysis of the fit.

TestValue The test value calculated for this fit.

See Also

RiskFitTestStatistic Overview

© Palisade Corporation. All Rights Reserved.

RiskFitTestStatistic Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 483: RISK Object Library - Palisade Corporation

Description

Returns the critical value of the test statistic based of the results of the parametric bootstrap analysis of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property CriticalValue( _

ByVal p_SignificanceLevel As Double _

) As Double

Parameters

p_SignificanceLevel

A value between 0 and 1.

Remarks

The value will be the special value RiskNaN if the bootstrap was not performed, failed to run successfully, or for tests that don't have critical values.

See Also

RiskFitTestStatistic Object | PValue Property

© Palisade Corporation. All Rights Reserved.

CriticalValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 484: RISK Object Library - Palisade Corporation

Description

Returns the type of fit statistic.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FitStatisticType() As RiskFitStatistic

See Also

RiskFitTestStatistic Object

© Palisade Corporation. All Rights Reserved.

FitStatisticType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 485: RISK Object Library - Palisade Corporation

Description

Returns the P-Value of the test statistic, based of the results of the parametric bootstrap analysis of the fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property PValue() As Double

Remarks

The value will be the special value RiskNaN if the bootstrap was not performed, failed to run successfully, or for statistics that don't have P-Values.

See Also

RiskFitTestStatistic Object | CriticalValue Property

© Palisade Corporation. All Rights Reserved.

PValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 486: RISK Object Library - Palisade Corporation

Description

The test value calculated for this fit.

Property type

Read-only property

Syntax (Visual Basic)

Public Property TestValue() As Double

Remarks

May be the special values RiskNaN, RiskPositiveInfinity, or RiskNegativeInfinity.

See Also

RiskFitTestStatistic Object

© Palisade Corporation. All Rights Reserved.

TestValue Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 487: RISK Object Library - Palisade Corporation

Description

Defines a goal seek analysis.

For a list of all members defined in this module, see RiskGoalSeekAnalysis members.

Example

[Visual Basic]

'Make the mean of the output in cell B5 equal to the value 100, by changing the value in A1.

'The output mean must be within 1% of the target value.

Public Sub RunGoalSeekAnalysis()

With Risk.Simulation.NewGoalSeekAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

.OutputTarget = 100

Set .VariationCell = ActiveSheet.Range("A1")

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

If .RunAnalysis() Then

MsgBox "The goal was reached."

Else

MsgBox "The goal could not be reached."

End If

End With

End Sub

See Also

RiskGoalSeekAnalysis Members | NewGoalSeekAnalysis Method

RiskGoalSeekAnalysis Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 488: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 489: RISK Object Library - Palisade Corporation

Public Methods

RunAnalysis Runs the analysis defined in the object.

WriteSettingsToWorkbook Writes the current object settings to the specified workbook.

Public Properties

ComparisonMethod Specifies how the output will be compared to the target value.

ComparisonTolerance Specifies how closely the output statistic must match the target value.

GenerateCompletedSimulationResults Specifies that a complete @RISK simulation should be run at the end of a successful goal seek analysis.

MaximumNumSimulations Specifies the maximum number of allowed simulations in the analysis.

OutputCell Specifies the goal seek analysis output cell.

OutputPercentile Specifies which percentile should be calculated for the goal seek output.

OutputStatistic Specifies what statistic is used for the goal seek output.

OutputTarget Specifies the desired value for the goal seek output.

VariationCell Specifies the cell to vary.

VariationMaximum Specifies the maximum value that that variation cell can take.

VariationMinimum Specifies the minimum value that that variation cell can take.

See Also

RiskGoalSeekAnalysis Overview | NewGoalSeekAnalysis Method

RiskGoalSeekAnalysis Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 490: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 491: RISK Object Library - Palisade Corporation

Description

Runs the analysis defined in the object.

Syntax

Public Function RunAnalysis() As Boolean

Return Type

Boolean - If the goal was reached, this result will be TRUE and the input cell will be replaced with the number that obtains the desired goal. If the goal could not be reached, the result will

be FALSE and the input cell will be unchanged.

Example

[Visual Basic]

'Make the mean of the output in cell B5 equal to the value 100, by changing the value in A1.

'The output mean must be within 1% of the target value.

Public Sub RunGoalSeekAnalysis()

With Risk.Simulation.NewGoalSeekAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

.OutputTarget = 100

Set .VariationCell = ActiveSheet.Range("A1")

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

If .RunAnalysis() Then

MsgBox "The goal was reached."

Else

MsgBox "The goal could not be reached."

RunAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 492: RISK Object Library - Palisade Corporation

End If

End With

End Sub

See Also

RiskGoalSeekAnalysis Object

© Palisade Corporation. All Rights Reserved.

Page 493: RISK Object Library - Palisade Corporation

Description

Writes the current object settings to the specified workbook.

Syntax

Public Sub WriteSettingsToWorkbook( _

ByVal p_Workbook As Workbook _

)

Parameters

p_Workbook

The Excel workbook where the goal seek settings are to be written.

Remarks

Once settings are written, they can be retrieved when creating a new RiskGoalSeekAnalysis object by specifying the SourceWorkbook parameter.

See Also

RiskGoalSeekAnalysis Object

© Palisade Corporation. All Rights Reserved.

WriteSettingsToWorkbook Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 494: RISK Object Library - Palisade Corporation

Description

Specifies how the output will be compared to the target value.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ComparisonMethod() As RiskGoalSeekComparisonMethod

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | RiskGoalSeekComparisonMethod Enumeration | ComparisonTolerance Property | OutputStatistic Property | OutputTarget Property

ComparisonMethod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 495: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 496: RISK Object Library - Palisade Corporation

Description

Specifies how closely the output statistic must match the target value.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ComparisonTolerance() As Double

Remarks

If the ComparisonMethod Property is set to RiskComparePercentOfTargetValue, this value is a percentage (e.g. .05 = 5%) of the OutputTarget Property. If set to

RiskCompareDistanceFromTargetValue, this value is the absolute distance allowed between the target and the actual calculated value.

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | ComparisonMethod Property | OutputStatistic Property | OutputTarget Property

ComparisonTolerance Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 497: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 498: RISK Object Library - Palisade Corporation

Description

Specifies that a complete @RISK simulation should be run at the end of a successful goal seek analysis.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GenerateCompletedSimulationResults() As Boolean

Remarks

Setting this property to TRUE allows the user (or macro code) to then analyze the results of the successful goal seek simulation.

See Also

RiskGoalSeekAnalysis Object

© Palisade Corporation. All Rights Reserved.

GenerateCompletedSimulationResults Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 499: RISK Object Library - Palisade Corporation

Description

Specifies the maximum number of allowed simulations in the analysis.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MaximumNumSimulations() As Integer

Remarks

If the goal seek analysis can not converge on a valid solution before the specified number of simulation, the analysis will fail.

See Also

RiskGoalSeekAnalysis Object

© Palisade Corporation. All Rights Reserved.

MaximumNumSimulations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 500: RISK Object Library - Palisade Corporation

Description

Specifies the goal seek analysis output cell.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputCell() As Range

Remarks

The cell must be an @RISK output. If a cell that is not an @RISK output is selected, it will automatically become an @RISK output when the analysis is run.

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | OutputPercentile Property | OutputStatistic Property | OutputTarget Property

OutputCell Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 501: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 502: RISK Object Library - Palisade Corporation

Description

Specifies which percentile should be calculated for the goal seek output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputPercentile() As Double

Remarks

This property only has effect if the OutputStatistic Property is set to RiskStatisticPercentile.

The value must be between 0 and 1.

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | OutputCell Property | OutputStatistic Property | OutputTarget Property

OutputPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 503: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 504: RISK Object Library - Palisade Corporation

Description

Specifies what statistic is used for the goal seek output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputStatistic() As RiskStatisticType

Remarks

If this property is set to RiskStatisticPercentile, the specific percentile to use is specified in the OutputPercentile Property.

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | OutputCell Property | OutputPercentile Property | OutputTarget Property

OutputStatistic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 505: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 506: RISK Object Library - Palisade Corporation

Description

Specifies the desired value for the goal seek output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputTarget() As Double

Remarks

How closely the target value must be matched is controlled by the ComparisonMethod Property and ComparisonTolerance Property.

Example

[Visual Basic]

'Specify the desired goal to set the 95% of cell A1 to be within 1% of 100.

Public Sub SetGoalSeekOutputInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .OutputCell = ActiveSheet.Range("A1")

.OutputStatistic = RiskStatisticPercentile

.OutputPercentile = 0.95

.OutputTarget = 100

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | OutputCell Property | OutputPercentile Property | OutputStatistic Property | ComparisonMethod Property | ComparisonTolerance Property

OutputTarget Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 507: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 508: RISK Object Library - Palisade Corporation

Description

Specifies the cell to vary.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationCell() As Range

Remarks

The cell value will vary between the values specified in the VariationMinimum Property and VariationMaximum Property.

Example

[Visual Basic]

'Make the variation cell A1, and vary it between 0 and 1000.

Public Sub SetGoalSeekVariationCellInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .VariationCell = ActiveSheet.Range("A1")

.VariationMinimum = 0

.VariationMaximum = 1000

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | VariationMaximum Property | VariationMinimum Property

VariationCell Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 509: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 510: RISK Object Library - Palisade Corporation

Description

Specifies the maximum value that that variation cell can take.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationMaximum() As Double

Remarks

If not specified, the default value is RiskPositiveInfinity, indicating that the variation cell is not bounded from above.

Example

[Visual Basic]

'Make the variation cell A1, and vary it between 0 and 1000.

Public Sub SetGoalSeekVariationCellInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .VariationCell = ActiveSheet.Range("A1")

.VariationMinimum = 0

.VariationMaximum = 1000

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | VariationCell Property | VariationMinimum Property

VariationMaximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 511: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 512: RISK Object Library - Palisade Corporation

Description

Specifies the minimum value that that variation cell can take.

Property type

Read-write property

Syntax (Visual Basic)

Public Property VariationMinimum() As Double

Remarks

If not specified, the default value is RiskNegativeInfinity, indicating that the variation cell is not bounded from below.

Example

[Visual Basic]

'Make the variation cell A1, and vary it between 0 and 1000.

Public Sub SetGoalSeekVariationCellInformation(ByVal p_Analysis As RiskGoalSeekAnalysis)

With p_Analysis

Set .VariationCell = ActiveSheet.Range("A1")

.VariationMinimum = 0

.VariationMaximum = 1000

End With

End Sub

See Also

RiskGoalSeekAnalysis Object | VariationCell Property | VariationMaximum Property

VariationMinimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 513: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 514: RISK Object Library - Palisade Corporation

Description

An object where @RISK modeling dialogs can be displayed, functions swapped, etc.

For a list of all members defined in this module, see RiskModel members.

See Also

RiskModel Members

© Palisade Corporation. All Rights Reserved.

RiskModel Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 515: RISK Object Library - Palisade Corporation

Public Methods

DisplayBatchFitWindow Displays the Distribution Batch Fitting Window to the user.

DisplayDefineDistributionWindow Displays the Define Distribution Window to the user.

DisplayDistributionArtistWindow Displays the Distribution Artist Window to the user.

DisplayFitDistributionWindow Displays the Distribution Fitting Window to the user.

DisplayInsertFunctionWindow Displays Excel's Insert Function Window (and corresponding @RISK distribution graph) for a specified @RISK function

type.

GetInputFunctions Returns an array of information about all the inputs in the currently open Excel workbooks.

GetOutputFunctions Returns an array of information about all the outptus in the currently open Excel workbooks.

SwapInFunctions Swaps in @RISK functions from currently open workbooks.

SwapOutFunctions Swaps out @RISK functions from currently open workbooks.

See Also

RiskModel Overview

© Palisade Corporation. All Rights Reserved.

RiskModel Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 516: RISK Object Library - Palisade Corporation

Description

Displays the Distribution Batch Fitting Window to the user.

Syntax

Public Sub DisplayBatchFitWindow()

See Also

RiskModel Object | DisplayFitDistributionWindow Method

© Palisade Corporation. All Rights Reserved.

DisplayBatchFitWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 517: RISK Object Library - Palisade Corporation

Description

Displays the Define Distribution Window to the user.

Syntax

Public Sub DisplayDefineDistributionWindow()

See Also

RiskModel Object

© Palisade Corporation. All Rights Reserved.

DisplayDefineDistributionWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 518: RISK Object Library - Palisade Corporation

Description

Displays the Distribution Artist Window to the user.

Syntax

Public Sub DisplayDistributionArtistWindow()

See Also

RiskModel Object

© Palisade Corporation. All Rights Reserved.

DisplayDistributionArtistWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 519: RISK Object Library - Palisade Corporation

Description

Displays the Distribution Fitting Window to the user.

Syntax

Public Sub DisplayFitDistributionWindow()

See Also

RiskModel Object | DisplayBatchFitWindow Method

© Palisade Corporation. All Rights Reserved.

DisplayFitDistributionWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 520: RISK Object Library - Palisade Corporation

Description

Displays Excel's Insert Function Window (and corresponding @RISK distribution graph) for a specified @RISK function type.

Syntax

Public Sub DisplayInsertFunctionWindow( _

ByVal p_FunctionToAdd As String _

)

Parameters

p_FunctionToAdd

A string specifying the function type. For example, "RiskNormal", "RiskTriang", etc.

See Also

RiskModel Object

© Palisade Corporation. All Rights Reserved.

DisplayInsertFunctionWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 521: RISK Object Library - Palisade Corporation

Description

Returns an array of information about all the inputs in the currently open Excel workbooks.

Syntax

Public Function GetInputFunctions( _

ByRef p_FunctionInfo() As RiskFunctionInformation _

) As Long

Parameters

p_FunctionInfo

A structure of type RiskFunctionInformation which will be filled with information about the location, name, and function that defines each input.

Return Type

A long containing the number of inputs returned in the array.

Example

[Visual Basic]

'Displays a message to the user, displaying a list of all inputs and their information:

Public Sub DiplayInputInformation()

Dim fInfo() As RiskFunctionInformation

Dim s As String

Dim n As String

Dim i As Long

n = Risk.Model.GetInputFunctions(fInfo)

s = "numInputs = " & n & vbCrLf

For i = 1 To n

With fInfo(i)

GetInputFunctions Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 522: RISK Object Library - Palisade Corporation

s = s & "#" & i & " : " & .Location.Address & vbTab & . Function & vbTab & .Name & vbCrLf

End With

Next i

MsgBox s

End Sub

See Also

RiskModel Object | GetOutputFunctions Method

© Palisade Corporation. All Rights Reserved.

Page 523: RISK Object Library - Palisade Corporation

Description

Returns an array of information about all the outptus in the currently open Excel workbooks.

Syntax

Public Function GetOutputFunctions( _

ByRef p_FunctionInfo() As RiskFunctionInformation _

) As Long

Parameters

p_FunctionInfo

A structure of type RiskFunctionInformation which will be filled with information about the location, name, and function that defines each output.

Return Type

A long containing the number of outputs returned in the array.

Example

[Visual Basic]

'Displays a message to the user, displaying a list of all outputs and their information:

Public Sub DiplayOutputInformation()

Dim fInfo() As RiskFunctionInformation

Dim s As String

Dim n As String

Dim i As Long

n = Risk.Model.GetOutputFunctions(fInfo)

s = "numOutputs = " & n & vbCrLf

For i = 1 To n

With fInfo(i)

GetOutputFunctions Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 524: RISK Object Library - Palisade Corporation

s = s & "#" & i & " : " & .Location.Address & vbTab & . Function & vbTab & .Name & vbCrLf

End With

Next i

MsgBox s

End Sub

See Also

RiskModel Object | GetInputFunctions Method

© Palisade Corporation. All Rights Reserved.

Page 525: RISK Object Library - Palisade Corporation

Description

Swaps in @RISK functions from currently open workbooks.

Syntax

Public Sub SwapInFunctions()

Remarks

To prevent any dialogs from being displayed during this process, turn off the DisplayAlerts Property.

See Also

RiskModel Object | SwapOutFunctions Method

© Palisade Corporation. All Rights Reserved.

SwapInFunctions Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 526: RISK Object Library - Palisade Corporation

Description

Swaps out @RISK functions from currently open workbooks.

Syntax

Public Sub SwapOutFunctions()

Remarks

To prevent any dialogs from being displayed during this process, turn off the DisplayAlerts Property.

See Also

RiskModel Object | SwapInFunctions Method

© Palisade Corporation. All Rights Reserved.

SwapOutFunctions Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 527: RISK Object Library - Palisade Corporation

Description

An object for the control of the @RISK for Project features of the application.

For a list of all members defined in this module, see RiskProject members.

See Also

RiskProject Members

© Palisade Corporation. All Rights Reserved.

RiskProject Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 528: RISK Object Library - Palisade Corporation

Public Methods

CreateParameterEntryTable Creates an @RISK for Project parameter entry table.

CreateProbabilisticGanttChart Creates a probabilistic Gantt chart in an Excel Workbook

CreateStandardGanttChart Creates a standard (deterministic) Gantt chart in an Excel Workbook.

ImportMPPFile Imports a Microsoft Project .MPP file into @RISK for Excel.

SyncProjectNow Synchronizes Excel Workbook containing @RISK for Project information will any models open in @RISK for Project.

Public Properties

CalculateCriticalIndices Controls whether Critical Indices are calculated during @RISK simulations.

CalculateProbabilisticGanttStats Controls whether Probabilistic Gantt chart information is calculated during @RISK simulations.

FeatureAvailable Indicates whether the @RISK for Project feature is available.

ProjectCalculationMode Controls how @RISK for Project is updated when changes are made in Microsoft Project

SimulationDateRange Controls the range of dates that will be simuated in @RISK for Project.

See Also

RiskProject Overview

© Palisade Corporation. All Rights Reserved.

RiskProject Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 529: RISK Object Library - Palisade Corporation

Description

Creates an @RISK for Project parameter entry table.

Syntax

Public Sub CreateParameterEntryTable( _

ByVal p_FieldName As String, _

ByVal p_DistributionName As String, _

ByVal p_MinChange As Double, _

ByVal p_MaxChange As Double, _

Optional ByVal p_TaskWorkbook As Workbook = Nothing _

)

Parameters

p_FieldName

The name of the field in project for which the parameter entry table will be created.

p_DistributionName

The name of the distribution type (e.g. RiskNormal).

p_MinChange

The minimum change amount, a fractional value between 0 and 1.

p_MaxChange

The maximum change amount, a fractional value between 0 and 1.

p_TaskWorkbook

Optional - If specified, the workbook in which the parameter entry table will be created. If omitted, a new parameter entry table will be created for each open workbook containing

@RISK for Project information.

See Also

RiskProject Object | CreateProbabilisticGanttChart Method | CreateStandardGanttChart Method

CreateParameterEntryTable Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 530: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 531: RISK Object Library - Palisade Corporation

Description

Creates a probabilistic Gantt chart in an Excel Workbook

Syntax

Public Sub CreateProbabilisticGanttChart( _

Optional ByVal p_TaskWorkbook As Workbook = Nothing _

)

Parameters

p_TaskWorkbook

Optional - If specified, the workbook in which the Gannt chart will be created. If omitted, one chart will be created for each open workbook containing @RISK for Project information.

See Also

RiskProject Object | CreateParameterEntryTable Method | CreateStandardGanttChart Method

© Palisade Corporation. All Rights Reserved.

CreateProbabilisticGanttChart Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 532: RISK Object Library - Palisade Corporation

Description

Creates a standard (deterministic) Gantt chart in an Excel Workbook.

Syntax

Public Sub CreateStandardGanttChart( _

Optional ByVal p_TaskWorkbook As Workbook = Nothing _

)

Parameters

p_TaskWorkbook

Optional - If specified, the workbook in which the Gannt chart will be created. If omitted, one chart will be created for each open workbook containing @RISK for Project information.

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

CreateStandardGanttChart Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 533: RISK Object Library - Palisade Corporation

Description

Imports a Microsoft Project .MPP file into @RISK for Excel.

Syntax

Public Sub ImportMPPFile( _

ByVal p_FilePath As String _

)

Parameters

p_FilePath

The full path and file name of the file to be imported.

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

ImportMPPFile Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 534: RISK Object Library - Palisade Corporation

Description

Synchronizes Excel Workbook containing @RISK for Project information will any models open in @RISK for Project.

Syntax

Public Sub SyncProjectNow()

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

SyncProjectNow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 535: RISK Object Library - Palisade Corporation

Description

Controls whether Critical Indices are calculated during @RISK simulations.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CalculateCriticalIndices() As Boolean

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

CalculateCriticalIndices Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 536: RISK Object Library - Palisade Corporation

Description

Controls whether Probabilistic Gantt chart information is calculated during @RISK simulations.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CalculateProbabilisticGanttStats() As Boolean

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

CalculateProbabilisticGanttStats Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 537: RISK Object Library - Palisade Corporation

Description

Indicates whether the @RISK for Project feature is available.

Property type

Read-only property

Syntax (Visual Basic)

Public Property FeatureAvailable() As Boolean

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

FeatureAvailable Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 538: RISK Object Library - Palisade Corporation

Description

Controls how @RISK for Project is updated when changes are made in Microsoft Project

Property type

Read-write property

Syntax (Visual Basic)

Public Property ProjectCalculationMode() As RiskProjectCalculationMode

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

ProjectCalculationMode Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 539: RISK Object Library - Palisade Corporation

Description

Controls the range of dates that will be simuated in @RISK for Project.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SimulationDateRange() As RiskProjectSimulationDateRange

See Also

RiskProject Object

© Palisade Corporation. All Rights Reserved.

SimulationDateRange Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 540: RISK Object Library - Palisade Corporation

Description

An object which allows access to the results of the most recently run @RISK simulation.

For a list of all members defined in this module, see RiskSimResultCollection members.

Object Model

See Also

RiskSimResultCollection Members

© Palisade Corporation. All Rights Reserved.

RiskSimResultCollection Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 541: RISK Object Library - Palisade Corporation

Public Methods

Clear Clears @RISK simulation results.

GetSimulatedInput Returns a RiskSimulatedResult object, containing information about the simulation results of the specified input

distribution.

GetSimulatedOutput Returns a RiskSimulatedResult object, containing information about the simulation results of the specified output.

ResultsGraph Creates a graph of the specified input and places it in Excel.

Public Properties

Exist Indicates whether there are currently any @RISK simulation results available.

NumInputs Indicates how many inputs exist in the current @RISK simulation results.

NumOutputs Indicates how many outputs exist in the current @RISK simulation results.

NumSimulations Indicates how many simulations exist in the current @RISK simulation results.

RandomNumberGenerator Returns the random number generator used to create the current set of @RISK results.

RandomNumberSeed Returns the random number seed used to generate the current simulation results.

See Also

RiskSimResultCollection Overview

© Palisade Corporation. All Rights Reserved.

RiskSimResultCollection Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 542: RISK Object Library - Palisade Corporation

Description

Clears @RISK simulation results.

Syntax

Public Sub Clear()

Example

[[New Example] (Visual Basic)]

Public Sub ClearSimulationResults()

Risk.Simulation.Results.Clear

End Sub

See Also

RiskSimResultCollection Object | Exist Property

© Palisade Corporation. All Rights Reserved.

Clear Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 543: RISK Object Library - Palisade Corporation

Description

Returns a RiskSimulatedResult object, containing information about the simulation results of the specified input distribution.

Syntax

Public Function GetSimulatedInput( _

ByVal p_Reference As Variant, _

Optional ByVal p_Simulation As Variant = 1 _

) As RiskSimulatedResult

Parameters

p_Reference

Indicates which input to return information for. This can be specified in three different ways:

(String) If the reference is a string, it refers to the official name of the input, as determined either automatically by @RISK, or directly specified in an RiskName() property function.

(Excel Range Object) If an Excel.Range object is passed for the reference, the input located in that cell will be used. If more than one input reside in that cell, the first input will be

used.

(Long) If an long integer is passed for the reference, the input with that index in @RISK's list of inputs will be used.

p_Simulation

Indicates which simulation to return information for, in the case of a multiple simulation run.

This parameter is optional. If not specified, the results of the first simulation will be returned.

This can be either the numerical index of the simulation, where the first simulation is 1, the second 2, and so on, or it can be the name of a simulation, as defined by the user.

Example

[[New Example] (Visual Basic)]

'Demonstrate three different ways to get an @RISK's input's mean and std. deviation and display it.

'Assume the 19th input in @RISK's input list has a name of 'MyInput' and is located on Cell C36 of the active sheet.

Public Sub GetInputStatisticsByName()

GetSimulatedInput Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 544: RISK Object Library - Palisade Corporation

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedInput("MyInput")

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

Public Sub GetInputStatisticsByRange()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedInput(ActiveSheet.Range("C36"))

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

Public Sub GetInputStatisticsByIndex()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedInput(19)

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

See Also

Page 545: RISK Object Library - Palisade Corporation

RiskSimResultCollection Object | GetSimulatedOutput Method | RiskSimulatedResult Object

© Palisade Corporation. All Rights Reserved.

Page 546: RISK Object Library - Palisade Corporation

Description

Returns a RiskSimulatedResult object, containing information about the simulation results of the specified output.

Syntax

Public Function GetSimulatedOutput( _

ByVal p_Reference As Variant, _

Optional ByVal p_Simulation As Variant = 1 _

) As RiskSimulatedResult

Parameters

p_Reference

Indicates which output to return information for. This can be specified in three different ways:

(String) If the reference is a string, it refers to the official name of the output, as determined either automatically by @RISK, or directly specified in the RiskOutput() function

(Excel Range Object) If an Excel.Range object is passed for the reference, the output located in that cell will be used.

(Long) If an long integer is passed for the reference, the output with that index in @RISK's list of outputs will be used.

p_Simulation

Indicates which simulation to return information for, in the case of a multiple simulation run.

This parameter is optional. If not specified, the results of the first simulation will be returned.

This can be either the numerical index of the simulation, where the first simulation is 1, the second 2, and so on, or it can be the name of a simulation, as defined by the user.

Example

[[New Example] (Visual Basic)]

'Demonstrate three different ways to get an @RISK's output's mean and std. deviation and display it.

'Assume the 11th output in @RISK's output list has a name of 'NPV (10%)' and is located on Cell C10 of the active sheet.

Public Sub GetOutputStatisticsByName()

Dim displayString As String

GetSimulatedOutput Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 547: RISK Object Library - Palisade Corporation

With Risk.Simulation.Results.GetSimulatedOutput("NPV (10%)")

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

Public Sub GetOutputStatisticsByRange()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput(ActiveSheet.Range("C10"))

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

Public Sub GetOutputStatisticsByIndex()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput(11)

displayString = "Mean = " & .Mean & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation

End With

MsgBox displayString

End Sub

See Also

RiskSimResultCollection Object | GetSimulatedInput Method | RiskSimulatedResult Object

Page 548: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 549: RISK Object Library - Palisade Corporation

Description

Creates a graph of the specified input and places it in Excel.

Syntax

Public Function ResultsGraph( _

ByVal p_SourceRange As Range, _

ByVal p_DestRange As Range, _

ByVal p_GraphType As RiskResultsGraphType, _

Optional ByVal p_UseExcelFormat As Boolean = False, _

Optional ByVal p_LeftDelimiterPercentile As Double = RISK_AUTO_BASE_VALUE, _

Optional ByVal p_RightDelimiterPercentile As Double = RISK_AUTO_BASE_VALUE, _

Optional ByVal p_XAxisMinimum As Double = RISK_AUTO_BASE_VALUE, _

Optional ByVal p_XAxisMaximum As Double = RISK_AUTO_BASE_VALUE, _

Optional ByVal p_XAxisScale As Integer = -32768, _

Optional ByVal p_Title As String = "", _

Optional ByVal p_SimNumber As Integer = 1 _

) As Object

Parameters

p_SourceRange

The location of the source input or output.

p_DestRange

The bounding range where the graph will be placed.

p_GraphType

Value Description

RiskResultsGraphHistogram

RiskResultsGraphCumulativeAscending

RiskResultsGraphCumulativeDescending

ResultsGraph Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 550: RISK Object Library - Palisade Corporation

RiskResultsGraphRegressionTornado

RiskResultsGraphCorrelationTornado

RiskResultsGraphSummaryGraph

RiskResultsGraphBoxPlot

RiskResultsGraphTheoreticalDistribution

RiskResultsGraphHistogramWithTheoreticalOverlay

RiskResultsGraphHistogramWithAscendingOverlay

RiskResultsGraphHistogramWithDescendingOverlay

RiskResultsGraphMapValueTornado

RiskResultsGraphScatterPlot

RiskResultsGraphHistogramRelativeFrequency

p_UseExcelFormat

If TRUE, the graph will be in Excel native format. If FALSE the graph will be a picture image of an @RISK graph.

p_LeftDelimiterPercentile

For graphs with delimiters, controls the placement of the left delimiter. Must be between 0 and 1.

p_RightDelimiterPercentile

For graphs with delimiters, controls the placement of the right delimiter. Must be between 0 and 1.

p_XAxisMinimum

Controls the x-axis minimum.

p_XAxisMaximum

Controls the x-axis maximum.

p_XAxisScale

Controls the x-axis scale, in terms of powers of 10. For example, 0 means no scale factor, 3 means a scale factor of 10^3 or "thousands."

p_Title

Controls the title of the graph.

Page 551: RISK Object Library - Palisade Corporation

p_SimNumber

Specified the simulation number for a multiple simulation run.

Return Type

The graph object. Either a Picture for an @RISK graph or a ChartObject for an Excel native chart.

Example

[Visual Basic]

'Makes a histogram graph in @RISK format for the output at cell C3.

Public Sub MakeHistogramGraph

Dim theGraph As Picture

Set theGraph = Risk.Simulation.Results.ResultsGraph(ActiveSheet.Range("C3", ActiveSheet.Range("e5:I15"), RiskResultsGraphHistogram)

End Sub

See Also

RiskSimResultCollection Object

© Palisade Corporation. All Rights Reserved.

Page 552: RISK Object Library - Palisade Corporation

Description

Indicates whether there are currently any @RISK simulation results available.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Exist() As Boolean

Example

[[New Example] (Visual Basic)]

'Display basic information about the current set of @RISK simulation results.

Public Sub DisplaySimulationResultInformation()

Dim displayString As String

If Risk.Simulation.Results.Exist Then

displayString = "There are @RISK simulation results."

displayString = displayString & vbCrLf & " # Inputs = " & Risk.Simulation.Results.NumInputs

displayString = displayString & vbCrLf & " # Outputs = " & Risk.Simulation.Results.NumOutputs

displayString = displayString & vbCrLf & " # Simulations = " & Risk.Simulation.Results.NumSimulations

Else

displayString = "There are no @RISK simulation results."

End If

MsgBox displayString

End Sub

See Also

RiskSimResultCollection Object | Clear Method | NumInputs Property | NumOutputs Property | NumSimulations Property

Exist Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 553: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 554: RISK Object Library - Palisade Corporation

Description

Indicates how many inputs exist in the current @RISK simulation results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumInputs() As Long

Remarks

Only the inputs that had their samples collection will be in this list. See the CollectDistributionSamples property for more information.

Example

[[New Example] (Visual Basic)]

'Display basic information about the current set of @RISK simulation results.

Public Sub DisplaySimulationResultInformation()

Dim displayString As String

If Risk.Simulation.Results.Exist Then

displayString = "There are @RISK simulation results."

displayString = displayString & vbCrLf & " # Inputs = " & Risk.Simulation.Results.NumInputs

displayString = displayString & vbCrLf & " # Outputs = " & Risk.Simulation.Results.NumOutputs

displayString = displayString & vbCrLf & " # Simulations = " & Risk.Simulation.Results.NumSimulations

Else

displayString = "There are no @RISK simulation results."

End If

MsgBox displayString

End Sub

NumInputs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 555: RISK Object Library - Palisade Corporation

See Also

RiskSimResultCollection Object | CollectDistributionSamples Property | NumOutputs Property | NumSimulations Property

© Palisade Corporation. All Rights Reserved.

Page 556: RISK Object Library - Palisade Corporation

Description

Indicates how many outputs exist in the current @RISK simulation results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumOutputs() As Long

Example

[[New Example] (Visual Basic)]

'Display basic information about the current set of @RISK simulation results.

Public Sub DisplaySimulationResultInformation()

Dim displayString As String

If Risk.Simulation.Results.Exist Then

displayString = "There are @RISK simulation results."

displayString = displayString & vbCrLf & " # Inputs = " & Risk.Simulation.Results.NumInputs

displayString = displayString & vbCrLf & " # Outputs = " & Risk.Simulation.Results.NumOutputs

displayString = displayString & vbCrLf & " # Simulations = " & Risk.Simulation.Results.NumSimulations

Else

displayString = "There are no @RISK simulation results."

End If

MsgBox displayString

End Sub

See Also

RiskSimResultCollection Object | NumInputs Property | NumSimulations Property

NumOutputs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 557: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 558: RISK Object Library - Palisade Corporation

Description

Indicates how many simulations exist in the current @RISK simulation results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumSimulations() As Long

Example

[[New Example] ()]

'Display basic information about the current set of @RISK simulation results.

Public Sub DisplaySimulationResultInformation()

Dim displayString As String

If Risk.Simulation.Results.Exist Then

displayString = "There are @RISK simulation results."

displayString = displayString & vbCrLf & " # Inputs = " & Risk.Simulation.Results.NumInputs

displayString = displayString & vbCrLf & " # Outputs = " & Risk.Simulation.Results.NumOutputs

displayString = displayString & vbCrLf & " # Simulations = " & Risk.Simulation.Results.NumSimulations

Else

displayString = "There are no @RISK simulation results."

End If

MsgBox displayString

End Sub

See Also

RiskSimResultCollection Object | NumInputs Property | NumOutputs Property | NumSimulations Property

NumSimulations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 559: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 560: RISK Object Library - Palisade Corporation

Description

Returns the random number generator used to create the current set of @RISK results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RandomNumberGenerator() As RiskRandomNumberGenerator

Example

[[New Example] (Visual Basic)]

'Display information about the random numbers used in the current @RISK simulation results.

Public Sub DisplaySimulationRandomNumberInformation()

Dim generatorString As String

If Risk.Simulation.Results.Exist Then

Select Case Risk.Simulation.Results.RandomNumberGenerator

Case RiskMersenneTwister: generatorString = "Mersenne Twister"

Case RiskMRG32k3a: generatorString = "MRG32k3a"

Case RiskMWC: generatorString = "MWC"

Case RiskKISS: generatorString = "KISS"

Case RiskLFIB4: generatorString = "LFIB4"

Case RiskSWB: generatorString = "SWB"

Case RiskKISS_SWB: generatorString = "KISS_SWB"

Case RiskRAN3I: generatorString = "RAN3I"

Case Else: generatorString = "<Unknown>"

End Select

RandomNumberGenerator Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 561: RISK Object Library - Palisade Corporation

MsgBox "The current @RISK simulation used" & vbCrLf & _

"Random Number Generator = " & generatorString & vbCrLf & _

"Seed = " & Risk.Simulation.Results.RandomNumberSeed

Else

MsgBox "There are no @RISK simulation results."

End If

End Sub

See Also

RiskSimResultCollection Object | RandomNumberSeed Property

© Palisade Corporation. All Rights Reserved.

Page 562: RISK Object Library - Palisade Corporation

Description

Returns the random number seed used to generate the current simulation results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property RandomNumberSeed( _

Optional ByVal p_Simulation As Variant = 1 _

) As Variant

Parameters

p_Simulation

Indicates which simulation to return information for, in the case of a multiple simulation run.

This can be either the numerical index of the simulation, where the first simulation is 1, the second 2, and so on, or it can be the name of a simulation, as defined by the user.

Example

[[New Example] (Visual Basic)]

'Display information about the random numbers used in the current @RISK simulation results.

Public Sub DisplaySimulationRandomNumberInformation()

Dim generatorString As String

If Risk.Simulation.Results.Exist Then

Select Case Risk.Simulation.Results.RandomNumberGenerator

Case RiskMersenneTwister: generatorString = "Mersenne Twister"

Case RiskMRG32k3a: generatorString = "MRG32k3a"

Case RiskMWC: generatorString = "MWC"

Case RiskKISS: generatorString = "KISS"

Case RiskLFIB4: generatorString = "LFIB4"

RandomNumberSeed Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 563: RISK Object Library - Palisade Corporation

Case RiskSWB: generatorString = "SWB"

Case RiskKISS_SWB: generatorString = "KISS_SWB"

Case RiskRAN3I: generatorString = "RAN3I"

Case Else: generatorString = "<Unknown>"

End Select

MsgBox "The current @RISK simulation used" & vbCrLf & _

"Random Number Generator = " & generatorString & vbCrLf & _

"Seed = " & Risk.Simulation.Results.RandomNumberSeed

Else

MsgBox "There are no @RISK simulation results."

End If

End Sub

See Also

RiskSimResultCollection Object | RandomNumberGenerator Property

© Palisade Corporation. All Rights Reserved.

Page 564: RISK Object Library - Palisade Corporation

Description

Contains simulation results for an @RISK input or output.

For a list of all members defined in this module, see RiskSimulatedResult members.

See Also

RiskSimulatedResult Members

© Palisade Corporation. All Rights Reserved.

RiskSimulatedResult Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 565: RISK Object Library - Palisade Corporation

Public Methods

CalculateCorrelationSensitivities Returns correlation sensitivity information for the simulation output results.

CalculateRegressionSensitivities Returns regression sensitivity information for the simulation output results.

CalculateScenarios Returns scenario information for the given simulated output result.

CalculateStatisticChangeSensitivities Returns "change is statistic" sensitivity information for a simulation output.

GetSampleData Returns an array of sample data for the given result.

Public Properties

ExcelCell Returns an Excel.Range object, indicating where the input or output was located.

IsOutput Indiciates whether a simulation result came from an output or an input.

ItemIndex Returns the index of the output or input in the collection of simulation results.

Kurtosis Returns the skewness (4th standardized central moment) of the simulation result.

Maximum Returns the maximum value sampled in the simulation result.

Mean Returns the mean of the simulation result.

Minimum Returns the minimum value sampled in the simulation result.

Mode Returns the (approximate) mode of the simulation result.

Name Returns the name of the input or output that generated the results in this object.

NumSamplesError Returns the number of samples that were excluded from result calculations because they had error values.

RiskSimulatedResult Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 566: RISK Object Library - Palisade Corporation

NumSamplesFiltered Returns the number of samples that were excluded from result calculations because they were removed from a

user-defined filter.

NumSamplesTotal Returns the total number of samples in the simulation result.

NumSamplesUsed Returns the total number of samples used to calculate the statistics, percentiles, and other results for this object.

PToX Returns a percentile (x-value) for the simulated result.

SimIndex For results generated from a multiple simulation run, indicates the index of the simulation refered to by this object.

Skewness Returns the skewness (3rd standardized central moment) of the simulation result.

StdDeviation Returns the standard deviation of the simulation result.

XToP Returns the fraction of samples that occur at or below the specified value.

See Also

RiskSimulatedResult Overview

© Palisade Corporation. All Rights Reserved.

Page 567: RISK Object Library - Palisade Corporation

Description

Returns correlation sensitivity information for the simulation output results.

Syntax

Public Function CalculateCorrelationSensitivities( _

ByRef p_Sensitivities() As RiskSensitivityData _

) As Long

Parameters

p_Sensitivities

An array of RISKSensitivityData stuctures that will be filled in by the method.

This array will come back sorted, with the highest correlation values first.

There will be one structure for each input that has a direct function relationship with the output. In other words, no input that is not a functional precedent of the output will appear in

this array. Even inputs with a correlation coefficient of zero with the output will be represented in the return array.

Return Type

Long - The number of elements in the returned array.

Remarks

This method can only be called on output simulation results.

Example

[[New Example] (Visual Basic)]

'Display correlation sensitivity information for the output 'MyOutput'.

Public Sub DisplayCorrelationSensitivities()

Dim displayString As String

Dim numInputs As Long

Dim sensitivityData() As RiskSensitivityData

Dim i As Long

CalculateCorrelationSensitivities Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 568: RISK Object Library - Palisade Corporation

numInputs = Risk.Simulation.Results.GetSimulatedOutput("MyOutput").CalculateCorrelationSensitivities(sensitivityData)

displayString = "There are " & numInputs & " inputs :" & vbCrLf

For i = 1 To numInputs

displayString = displayString & "Input #" & i & " : " & _

Risk.Simulation.Results.GetSimulatedInput(sensitivityData(i).InputIndex).ExcelCell.Address & _

" = " & sensitivityData(i).Coefficient & vbCrLf

Next i

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | CalculateRegressionSensitivities Method | CalculateScenarios Method | RiskSensitivityData Structure

© Palisade Corporation. All Rights Reserved.

Page 569: RISK Object Library - Palisade Corporation

Description

Returns regression sensitivity information for the simulation output results.

Syntax

Public Function CalculateRegressionSensitivities( _

ByVal p_CoefficientFormat As RiskRegressionCoefficientFormat, _

ByRef p_Sensitivities() As RiskSensitivityData, _

Optional ByRef p_RValue As Double _

) As Long

Parameters

p_CoefficientFormat

Value Description

RiskRegressionEquationCoefficients Raw regression equation coefficients.

RiskRegressionStdBCoefficients The raw regression equation coefficients are 'standardized' by multiplying by the factor (Input Std. Deviation / Output Std.

Deviation).

RiskRegressionMappedValues The raw regression equation coefficients are multiplied by the Input Std. Deviation.

Indicates in what format the regression coefficients should be returned.

p_Sensitivities

An array of RISKSensitivityData stuctures that will be filled in by the method.

This array will come back sorted, with the highest coefficient values first.

There will be one structure for each input that has a direct function relationship with the output. In other words, no input that is not a functional precedent of the output will appear in

this array. Even inputs with a regression coefficient of zero with the output will be represented in the return array.

The type of coefficient returned is controled by the CoefficientFormat parameter.

p_RValue

Optionally returns the 'r'-Value of the regression fit.

CalculateRegressionSensitivities Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 570: RISK Object Library - Palisade Corporation

Return Type

Long - The size of the Sensitivities return array.

Remarks

This method can only be called on output simulation results.

Example

[[New Example] (Visual Basic)]

'Display regression sensitivity information for the output 'MyOutput'.

Public Sub DisplayRegressionSensitivities()

Dim displayString

Dim numInputs As Long

Dim sensitivityData() As RiskSensitivityData

Dim rValue As Double

Dim i As Long

numInputs = Risk.Simulation.Results.GetSimulatedOutput("MyOutput").CalculateRegressionSensitivities(RiskRegressionStdBCoefficients, sensitivityData, rValue)

displayString = "There are " & numInputs & " inputs :" & vbCrLf

displayString = "r-Value = " & rValue & vbCrLf

For i = 1 To numInputs

displayString = displayString & "Input #" & i & " : " & _

Risk.Simulation.Results.GetSimulatedInput(sensitivityData(i).InputIndex).ExcelCell.Address & _

" = " & sensitivityData(i).Coefficient & vbCrLf

Next i

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | CalculateCorrelationSensitivities Method | CalculateScenarios Method | RiskSensitivityData Structure | RiskRegressionCoefficientFormat Enumeration

Page 571: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 572: RISK Object Library - Palisade Corporation

Description

Returns scenario information for the given simulated output result.

Syntax

Public Function CalculateScenarios( _

ByVal p_TargetMinimum As Double, _

ByVal p_TargetMaximum As Double, _

ByVal p_TargetsArePercentiles As Boolean, _

ByRef p_ScenarioData() As RiskScenarioData _

) As Long

Parameters

p_TargetMinimum

The minimum target value. This is either an actual value or a percentile (between 0 and 1) depending on the TargetsArePercentiles parameter.

p_TargetMaximum

The maximum target value. This is either an actual value or a percentile (between 0 and 1) depending on the TargetsArePercentiles parameter.

p_TargetsArePercentiles

Indicates whether the values specified in TargetMinimum and TargetMaximum are percentiles or actual values.

p_ScenarioData

An array of RISKScenarioData stuctures that will be filled in by the method.

This array will come back sorted, with the highest significance values first.

There will be one structure for each input that has a direct function relationship with the output. In other words, no input that is not a functional precedent of the output will appear in

this array. Even inputs with a significance of zero for the specified target and output will be represented in the return array.

Return Type

Long - The number of scenario results in the returned array.

Remarks

This method can only be called on output simulation results.

CalculateScenarios Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 573: RISK Object Library - Palisade Corporation

Example

[[New Example] (Visual Basic)]

'Show the scenario significance information for a >75% scenario.

Public Sub DisplayScenarioResults()

Dim displayString As String

Dim numInputs As String

Dim scenarioData() As RiskScenarioData

Dim i As Long

numInputs = Risk.Simulation.Results.GetSimulatedOutput(ActiveSheet.Range("C10")).CalculateScenarios(0.75, 1, True, scenarioData)

displayString = "There are " & numInputs & " inputs :" & vbCrLf

For i = 1 To numInputs

displayString = displayString & "Input #" & i & " : " & _

Risk.Simulation.Results.GetSimulatedInput(scenarioData(i).InputIndex).ExcelCell.Address & _

" = " & scenarioData(i).Significance & vbCrLf

Next i

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | CalculateCorrelationSensitivities Method | CalculateRegressionSensitivities Method | RiskScenarioData Structure

© Palisade Corporation. All Rights Reserved.

Page 574: RISK Object Library - Palisade Corporation

Description

Returns "change is statistic" sensitivity information for a simulation output.

Syntax

Public Function CalculateStatisticChangeSensitivities( _

ByVal p_NumBins As Long, _

ByVal p_Statistic As RiskStatisticType, _

ByVal p_Percentile As Double, _

ByRef p_Sensitivities() As RiskStatisticSensitivityData _

) As Long

Parameters

p_NumBins

The number of bins that the data will be grouped into.

p_Statistic

Value Description

RiskStatisticMinimum The minimum.

RiskStatisticMaximum The maximum.

RiskStatisticMean The mean.

RiskStatisticMode The mode.

RiskStatisticMedian The median (50th percentile)

RiskStatisticSkewness The skewness.

RiskStatisticKurtosis The kurtosis.

RiskStatisticStdDeviation The standard deviation.

CalculateStatisticChangeSensitivities Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 575: RISK Object Library - Palisade Corporation

RiskStatisticVariance The variance.

RiskStatisticPercentile A percentile.

RiskStatisticRange

Currently only the mean and percentiles are permitted.

p_Percentile

If the Statistic specified is a percentile, specifies which percentile. Must be between 0 and 1.

p_Sensitivities

An array of RiskStatisticSensitivityData Structure that will be filled in by the method.

This array will come back sorted, with the highest correlation values first.

There will be one structure for each input that has a direct function relationship with the output. In other words, no input that is not a functional precedent of the output will appear in

this array. Even inputs with a correlation coefficient of zero with the output will be represented in the return array.

Return Type

Long - The number of inputs in the returned array. Only inputs with a functional (precedence) relationship with the output will be included.

Example

[Visual Basic]

'Display the most signifant input in controlling the mean of the output in cell d6.

Public Sub GetMostSignficantInput()

Dim outputResult As RiskSimulatedResult

Dim numInputs As Long

Dim sensInfo() As RiskStatisticSensitivityData

Dim inputLocation As String

Set outputResult = Risk.Simulation.Results.GetSimulatedOutput(Range("Sheet1!$D$6"))

numInputs = outputResult.CalculateStatisticChangeSensitivities(5, RiskStatisticMean, 0, sensInfo)

If (numInputs > 0) Then

inputLocation = Risk.Simulation.Results.GetSimulatedInput(sensInfo(1).InputIndex).ExcelCell.Address

Page 576: RISK Object Library - Palisade Corporation

With sensInfo(1)

MsgBox "Biggest Input " & inputLocation & " -> Min Mean = " & .MinimumValue & " Max Mean = " & .MaximumValue

End With

End If

End Sub

See Also

RiskSimulatedResult Object

© Palisade Corporation. All Rights Reserved.

Page 577: RISK Object Library - Palisade Corporation

Description

Returns an array of sample data for the given result.

Syntax

Public Function GetSampleData( _

ByRef p_Data() As Double, _

ByVal p_ValidSamplesOnly As Variant _

) As Long

Parameters

p_Data

The array which will be filled with sample data by the method.

p_ValidSamplesOnly

Indicates whether only valid samples (non-error, non-filtered values) will be returned. Setting this to TRUE will strip these values from the array. Setting the to FALSE will leave the

bad values in the array, where they will be marked with the special value RiskNaN.

Return Type

Long - The number of elements in the array.

Example

[[New Example] (Visual Basic)]

Public Sub DisplaySampleData()

Dim displayString As String

Dim numSamples As Long

Dim numSamplesToDisplay As Long

Dim sampleData() As Double

Dim i As Long

numSamples = Risk.Simulation.Results.GetSimulatedOutput( "MyOutput").GetSampleData(sampleData, True)

GetSampleData Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 578: RISK Object Library - Palisade Corporation

If numSamples > 10 Then numSamplesToDisplay = 10 Else numSamplesToDisplay = numSamples

displayString = "There are " & numSamples & " valid samples." & vbCrLf

displayString = displayString & "The first " & numSamplesToDisplay & " values are:" & vbCrLf

For i = 1 To numSamplesToDisplay

displayString = displayString & sampleData(i) & vbCrLf

Next i

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | NumSamplesUsed Property | NumSamplesTotal Property

© Palisade Corporation. All Rights Reserved.

Page 579: RISK Object Library - Palisade Corporation

Description

Returns an Excel.Range object, indicating where the input or output was located.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ExcelCell() As Range

Remarks

This cell location refers to the cell where the input or output was located at the time the simulation was run. If subsequently the input or output was moved, this location may no longer be

correct.

Example

[[New Example] (Visual Basic)]

'Displays basic information about the simulation results for output 'MyOutput'.

Public Sub DisplayResultIdentificationInformation()

Dim displayString

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Name = " & .Name & vbCrLf

displayString = displayString & "IsOutput = " & .IsOutput & vbCrLf

displayString = displayString & "Cell = " & .ExcelCell.Address & vbCrLf

displayString = displayString & "ItemIndex = " & .ItemIndex & vbCrLf

displayString = displayString & "SimIndex = " & .SimIndex & vbCrLf

End With

MsgBox displayString

End Sub

ExcelCell Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 580: RISK Object Library - Palisade Corporation

See Also

RiskSimulatedResult Object | ItemIndex Property | Name Property

© Palisade Corporation. All Rights Reserved.

Page 581: RISK Object Library - Palisade Corporation

Description

Indiciates whether a simulation result came from an output or an input.

Property type

Read-only property

Syntax (Visual Basic)

Public Property IsOutput() As Boolean

Example

[[New Example] (Visual Basic)]

'Displays basic information about the simulation results for output 'MyOutput'.

Public Sub DisplayResultIdentificationInformation()

Dim displayString

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Name = " & .Name & vbCrLf

displayString = displayString & "IsOutput = " & .IsOutput & vbCrLf

displayString = displayString & "Cell = " & .ExcelCell.Address & vbCrLf

displayString = displayString & "ItemIndex = " & .ItemIndex & vbCrLf

displayString = displayString & "SimIndex = " & .SimIndex & vbCrLf

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | ExcelCell Property | ItemIndex Property | Name Property | SimIndex Property

IsOutput Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 582: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 583: RISK Object Library - Palisade Corporation

Description

Returns the index of the output or input in the collection of simulation results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property ItemIndex() As Long

Remarks

There are two lists, one for inputs and one for outputs. Thus there can be an input with index 1 and an output with index 1.

This index is reference by several analysis results, such as those returned by CalculateCorrelationSensitivities, CalculateRegressionSensitivities, and CalculationScenarios.

Example

[[New Example] (Visual Basic)]

'Displays basic information about the simulation results for output 'MyOutput'.

Public Sub DisplayResultIdentificationInformation()

Dim displayString

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Name = " & .Name & vbCrLf

displayString = displayString & "IsOutput = " & .IsOutput & vbCrLf

displayString = displayString & "Cell = " & .ExcelCell.Address & vbCrLf

displayString = displayString & "ItemIndex = " & .ItemIndex & vbCrLf

displayString = displayString & "SimIndex = " & .SimIndex & vbCrLf

End With

MsgBox displayString

ItemIndex Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 584: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | ExcelCell Property | IsOutput Property | Name Property | SimIndex Property

© Palisade Corporation. All Rights Reserved.

Page 585: RISK Object Library - Palisade Corporation

Description

Returns the skewness (4th standardized central moment) of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Kurtosis() As Double

Remarks

There are two different definitions commonly used by statisticians for kurtosis, which differ from each other by 3. The one used by @RISK gives the normal distribution a kurtosis of 3 and

not 0.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

Kurtosis Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 586: RISK Object Library - Palisade Corporation

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 587: RISK Object Library - Palisade Corporation

Description

Returns the maximum value sampled in the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Maximum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

MsgBox displayString

Maximum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 588: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 589: RISK Object Library - Palisade Corporation

Description

Returns the mean of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mean() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

MsgBox displayString

Mean Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 590: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Maximum Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 591: RISK Object Library - Palisade Corporation

Description

Returns the minimum value sampled in the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Minimum() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

MsgBox displayString

Minimum Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 592: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 593: RISK Object Library - Palisade Corporation

Description

Returns the (approximate) mode of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Mode() As Double

Remarks

The mode of a set of continuous sample data is not easily calculated. The result returned here is only an approximation.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

Mode Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 594: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Maximum Property | Mean Property | StdDeviation Property | Skewness Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 595: RISK Object Library - Palisade Corporation

Description

Returns the name of the input or output that generated the results in this object.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Name() As String

Example

[[New Example] (Visual Basic)]

'Displays basic information about the simulation results for output 'MyOutput'.

Public Sub DisplayResultIdentificationInformation()

Dim displayString

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Name = " & .Name & vbCrLf

displayString = displayString & "IsOutput = " & .IsOutput & vbCrLf

displayString = displayString & "Cell = " & .ExcelCell.Address & vbCrLf

displayString = displayString & "ItemIndex = " & .ItemIndex & vbCrLf

displayString = displayString & "SimIndex = " & .SimIndex & vbCrLf

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | ExcelCell Property | IsOutput Property | ItemIndex Property | SimIndex Property

Name Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 596: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 597: RISK Object Library - Palisade Corporation

Description

Returns the number of samples that were excluded from result calculations because they had error values.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumSamplesError() As Long

Example

[[New Example] (Visual Basic)]

'Display the sample counts for the simulation output 'MyOutput'.

Public Sub DisplaySampleCounts()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Sample counts for output 'MyOutput':" & vbCrLf

displayString = displayString & "Total Samples = " & .NumSamplesTotal & vbCrLf

displayString = displayString & "Filtered Samples = " & .NumSamplesFiltered & vbCrLf

displayString = displayString & "Error Samples = " & .NumSamplesError & vbCrLf

displayString = displayString & "Valid Samples = " & .NumSamplesUsed & vbCrLf

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | NumSamplesTotal Property | NumSamplesUsed Property | NumSamplesFiltered Property | NumSamplesError Property

NumSamplesError Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 598: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 599: RISK Object Library - Palisade Corporation

Description

Returns the number of samples that were excluded from result calculations because they were removed from a user-defined filter.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumSamplesFiltered() As Long

Example

[[New Example] (Visual Basic)]

'Display the sample counts for the simulation output 'MyOutput'.

Public Sub DisplaySampleCounts()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Sample counts for output 'MyOutput':" & vbCrLf

displayString = displayString & "Total Samples = " & .NumSamplesTotal & vbCrLf

displayString = displayString & "Filtered Samples = " & .NumSamplesFiltered & vbCrLf

displayString = displayString & "Error Samples = " & .NumSamplesError & vbCrLf

displayString = displayString & "Valid Samples = " & .NumSamplesUsed & vbCrLf

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | NumSamplesTotal Property | NumSamplesUsed Property | NumSamplesError Property

NumSamplesFiltered Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 600: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 601: RISK Object Library - Palisade Corporation

Description

Returns the total number of samples in the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumSamplesTotal() As Long

Remarks

This sample count includes all samples, even if they included errors or values that were filtered out. Use the NumSamplesUsed property for the number of sample that were used to

calculation the statistics, percentiles, and other results for this simulation result object.

Example

[[New Example] (Visual Basic)]

'Display the sample counts for the simulation output 'MyOutput'.

Public Sub DisplaySampleCounts()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Sample counts for output 'MyOutput':" & vbCrLf

displayString = displayString & "Total Samples = " & .NumSamplesTotal & vbCrLf

displayString = displayString & "Filtered Samples = " & .NumSamplesFiltered & vbCrLf

displayString = displayString & "Error Samples = " & .NumSamplesError & vbCrLf

displayString = displayString & "Valid Samples = " & .NumSamplesUsed & vbCrLf

End With

MsgBox displayString

End Sub

NumSamplesTotal Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 602: RISK Object Library - Palisade Corporation

See Also

RiskSimulatedResult Object | NumSamplesUsed Property | NumSamplesFiltered Property | NumSamplesError Property

© Palisade Corporation. All Rights Reserved.

Page 603: RISK Object Library - Palisade Corporation

Description

Returns the total number of samples used to calculate the statistics, percentiles, and other results for this object.

Property type

Read-only property

Syntax (Visual Basic)

Public Property NumSamplesUsed() As Long

Remarks

The count excludes any samples that were filtered or that were error values. Use the NumSamplesTotal property to get the total number of samples, regardless if they were excluded from

the result calculations or not.

Example

[[New Example] (Visual Basic)]

'Display the sample counts for the simulation output 'MyOutput'.

Public Sub DisplaySampleCounts()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Sample counts for output 'MyOutput':" & vbCrLf

displayString = displayString & "Total Samples = " & .NumSamplesTotal & vbCrLf

displayString = displayString & "Filtered Samples = " & .NumSamplesFiltered & vbCrLf

displayString = displayString & "Error Samples = " & .NumSamplesError & vbCrLf

displayString = displayString & "Valid Samples = " & .NumSamplesUsed & vbCrLf

End With

MsgBox displayString

End Sub

NumSamplesUsed Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 604: RISK Object Library - Palisade Corporation

See Also

RiskSimulatedResult Object | NumSamplesTotal Property | NumSamplesFiltered Property | NumSamplesError Property

© Palisade Corporation. All Rights Reserved.

Page 605: RISK Object Library - Palisade Corporation

Description

Returns a percentile (x-value) for the simulated result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property PToX( _

ByVal p_PValue As Double _

) As Double

Parameters

p_PValue

The p-value (a number between 0 and 1) for which to returnt the corresponding x-value.

Remarks

PToX calculates the value of the result (the "x-value") such that the specified percentage of the samples are at that x-value or less.

The XToP method performs the opposite operation, and returns the percentage of samples that fall at or below the specified x-value.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the 10th, 50th, and 90th percentiles of the the simulated output 'MyOutput'.

Public Sub CalculatePercentiles()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "10% = " & .PToX(0.1) & vbCrLf

displayString = displayString & "50% = " & .PToX(0.5) & vbCrLf

PToX Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 606: RISK Object Library - Palisade Corporation

displayString = displayString & "90% = " & .PToX(0.9) & vbCrLf

End With

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | XToP Property | RiskPositiveInfinity Property | RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 607: RISK Object Library - Palisade Corporation

Description

For results generated from a multiple simulation run, indicates the index of the simulation refered to by this object.

Property type

Read-only property

Syntax (Visual Basic)

Public Property SimIndex() As Long

Remarks

The first simulation is 1, the second 2, and so on.

Example

[[New Example] (Visual Basic)]

'Displays basic information about the simulation results for output 'MyOutput'.

Public Sub DisplayResultIdentificationInformation()

Dim displayString

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Name = " & .Name & vbCrLf

displayString = displayString & "IsOutput = " & .IsOutput & vbCrLf

displayString = displayString & "Cell = " & .ExcelCell.Address & vbCrLf

displayString = displayString & "ItemIndex = " & .ItemIndex & vbCrLf

displayString = displayString & "SimIndex = " & .SimIndex & vbCrLf

End With

MsgBox displayString

End Sub

SimIndex Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 608: RISK Object Library - Palisade Corporation

See Also

RiskSimulatedResult Object | ExcelCell Property | IsOutput Property | ItemIndex Property | Name Property | NumSimulations Property

© Palisade Corporation. All Rights Reserved.

Page 609: RISK Object Library - Palisade Corporation

Description

Returns the skewness (3rd standardized central moment) of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Skewness() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

MsgBox displayString

Skewness Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 610: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Maximum Property | Mean Property | Mode Property | StdDeviation Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 611: RISK Object Library - Palisade Corporation

Description

Returns the standard deviation of the simulation result.

Property type

Read-only property

Syntax (Visual Basic)

Public Property StdDeviation() As Double

Remarks

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the statistics of the simulation results for output 'MyOutput'.

Public Sub DisplayResultStatistics()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Minimum = " & .Minimum & vbCrLf

displayString = displayString & "Maximum = " & .Maximum & vbCrLf

displayString = displayString & "Mean = " & .Mean & vbCrLf

displayString = displayString & "Mode (Approximate) = " & .Mode & vbCrLf

displayString = displayString & "Std. Deviation = " & .StdDeviation & vbCrLf

displayString = displayString & "Skewness = " & .Skewness & vbCrLf

displayString = displayString & "Kurtosis = " & .Kurtosis & vbCrLf

End With

MsgBox displayString

StdDeviation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 612: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulatedResult Object | Minimum Property | Maximum Property | Mean Property | Mode Property | Skewness Property | Kurtosis Property | RiskPositiveInfinity Property

| RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 613: RISK Object Library - Palisade Corporation

Description

Returns the fraction of samples that occur at or below the specified value.

Property type

Read-only property

Syntax (Visual Basic)

Public Property XToP( _

ByVal p_XValue As Double _

) As Double

Parameters

p_XValue

The x-value for which to return the corresponding p-value.

Remarks

XToP calculates the fraction of samples (the 'p-value') that fall below the specified 'x-value'.

The PToX method performs the opposite operation, and returns the x-value which has the specified fraction of values at or below it.

The special values RiskPositiveInfinity, RiskNegativeInfinity, and RiskNaN can be returned by @RISK statistics properties to indicate infinities or "Not a Number" results.

Example

[[New Example] (Visual Basic)]

'Display the fraction of values that occur at or below 0 for the simulation output 'MyOutput'.

Public Sub DisplayFractionOfNonPositiveSamples()

Dim displayString As String

With Risk.Simulation.Results.GetSimulatedOutput("MyOutput")

displayString = "Fraction of Samples At or Below Zero = " & .XToP(0)

End With

XToP Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 614: RISK Object Library - Palisade Corporation

MsgBox displayString

End Sub

See Also

RiskSimulatedResult Object | PToX Property | RiskPositiveInfinity Property | RiskNegativeInfinity Property | RiskNaN Property

© Palisade Corporation. All Rights Reserved.

Page 615: RISK Object Library - Palisade Corporation

Description

An object where @RISK simulations can be setup, started, and results analyzed.

For a list of all members defined in this module, see RiskSimulation members.

Object Model

See Also

RiskSimulation Members

RiskSimulation Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 616: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 617: RISK Object Library - Palisade Corporation

Public Methods

CloseBrowseResultsWindow Closes an open Browse Results Window.

DisplayBrowseResultsWindow Shows the Browse results window to the user.

NewAdvSensitivityAnalysis Creates a new RiskAdvSensitivityAnalysis object, for use in automating @RISK's Advanced Sensitivity Analysis feature.

NewGoalSeekAnalysis Creates a new RiskGoalSeekAnalysis object, for use in automating @RISK's Goal Seek feature.

NewStressAnalysis Creates a new RiskStressAnalysis object, for use in automating @RISK's Stress Analysis feature.

start Starts a new simulation using the currently defined simulation settings

Public Properties

Results Returns a RiskSimResultsCollection object, which provides access to the current @RISK results.

Settings Provides access to the currently active set of @RISK simulation settings.

See Also

RiskSimulation Overview

© Palisade Corporation. All Rights Reserved.

RiskSimulation Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 618: RISK Object Library - Palisade Corporation

Description

Closes an open Browse Results Window.

Syntax

Public Sub CloseBrowseResultsWindow()

Remarks

The Browse Results Window can be opened with the DisplayBrowseResultsWindow Method.

If the Browse Results Window is not currently opened, this method will raise an error.

See Also

RiskSimulation Object | DisplayBrowseResultsWindow Method

© Palisade Corporation. All Rights Reserved.

CloseBrowseResultsWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 619: RISK Object Library - Palisade Corporation

Description

Shows the Browse results window to the user.

Syntax

Public Sub DisplayBrowseResultsWindow()

Remarks

The windows will be displayed showing the results of the currently active Excel cell.

This command will only work if the InterfaceMode Property is RiskStandardOperation and there are results to be displayed.

See Also

RiskSimulation Object | CloseBrowseResultsWindow Method

© Palisade Corporation. All Rights Reserved.

DisplayBrowseResultsWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 620: RISK Object Library - Palisade Corporation

Description

Creates a new RiskAdvSensitivityAnalysis object, for use in automating @RISK's Advanced Sensitivity Analysis feature.

Syntax

Public Function NewAdvSensitivityAnalysis( _

Optional ByVal p_SourceWorkbook As Workbook = Nothing _

) As RiskAdvSensAnalysis

Parameters

p_SourceWorkbook

If supplied, the returned RiskAdvSensitivityAnalysis will be filled with analysis settings that were already stored in the specified workbook. If left blank, a set of default settings is used.

Example

[Visual Basic]

Public Sub RunAdvSensitivityAnalysis()

With Risk.Simulation.NewAdvSensitivityAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

With .Inputs.Add(RiskSensAnalysisCellBasedInput, ActiveSheet.Range("A1"))

.VariationMethod = RiskVariationMinMaxRange

.VariationMinimum = 0

.VariationMaximum = 100

.BaseValue = 50

End With

.ReportPlacement = RiskNewWorkbook

.RunAnalysis

NewAdvSensitivityAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 621: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulation Object | RiskAdvSensAnalysis Object | NewGoalSeekAnalysis Method | NewStressAnalysis Method

© Palisade Corporation. All Rights Reserved.

Page 622: RISK Object Library - Palisade Corporation

Description

Creates a new RiskGoalSeekAnalysis object, for use in automating @RISK's Goal Seek feature.

Syntax

Public Function NewGoalSeekAnalysis( _

Optional ByVal p_SourceWorkbook As Workbook = Nothing _

) As RiskGoalSeekAnalysis

Parameters

p_SourceWorkbook

If supplied, the returned RiskGoalSeekAnalysis will be filled with analysis settings that were already stored in the specified workbook. If left blank, a set of default settings is used.

Example

[Visual Basic]

'Make the mean of the output in cell B5 equal to the value 100, by changing the value in A1.

'The output mean must be within 1% of the target value.

Public Sub RunGoalSeekAnalysis()

With Risk.Simulation.NewGoalSeekAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

.OutputStatistic = RiskStatisticMean

.OutputTarget = 100

Set .VariationCell = ActiveSheet.Range("A1")

.ComparisonMethod = RiskComparePercentOfTargetValue

.ComparisonTolerance = 0.01

If .RunAnalysis() Then

MsgBox "The goal was reached."

NewGoalSeekAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 623: RISK Object Library - Palisade Corporation

Else

MsgBox "The goal could not be reached."

End If

End With

End Sub

See Also

RiskSimulation Object | RiskGoalSeekAnalysis Object | NewAdvSensitivityAnalysis Method | NewStressAnalysis Method

© Palisade Corporation. All Rights Reserved.

Page 624: RISK Object Library - Palisade Corporation

Description

Creates a new RiskStressAnalysis object, for use in automating @RISK's Stress Analysis feature.

Syntax

Public Function NewStressAnalysis( _

Optional ByVal p_SourceWorkbook As Workbook = Nothing _

) As RiskStressAnalysis

Parameters

p_SourceWorkbook

If supplied, the returned RiskStressAnalysis object will be filled with analysis settings that were already stored in the specified workbook. If left blank, a set of default settings is used.

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

NewStressAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 625: RISK Object Library - Palisade Corporation

See Also

RiskSimulation Object | RiskStressAnalysis Object | NewAdvSensitivityAnalysis Method | NewGoalSeekAnalysis Method

© Palisade Corporation. All Rights Reserved.

Page 626: RISK Object Library - Palisade Corporation

Description

Starts a new simulation using the currently defined simulation settings

Syntax

Public Function start() As RiskSimulationCompletionStatus

Return Type

RiskSimulationCompetionStatus - indicating how the simulation was terminated.

Example

[[New Example] (Visual Basic)]

'Run a 100 iteration simulation and display the mean of the output named "NPV"

Public Sub RunSimulationWith100Iterations()

Risk.Simulation.Settings.NumIterations = 100

If Risk.Simulation.Start = RiskSimulationCompletedSuccessfully Then

MsgBox Risk.Simulation.Results.GetSimulatedOutput("NPV").Mean

Else

MsgBox "This simulation did not finish."

End If

End Sub

See Also

RiskSimulation Object | RiskSimulationCompletionStatus Enumeration

© Palisade Corporation. All Rights Reserved.

start Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 627: RISK Object Library - Palisade Corporation

Description

Returns a RiskSimResultsCollection object, which provides access to the current @RISK results.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Results() As RiskSimResultCollection

Example

[[New Example] (Visual Basic)]

'Display a message indicating if there are any active @RISK results.

Public Sub CheckForResults()

If Risk.Simulation.Results.Exist Then

MsgBox "There are @RISK results."

Else

MsgBox "There are not any @RISK results."

End If

End Sub

See Also

RiskSimulation Object

© Palisade Corporation. All Rights Reserved.

Results Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 628: RISK Object Library - Palisade Corporation

Description

Provides access to the currently active set of @RISK simulation settings.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Settings() As RiskSimulationSettings

Example

[[New Example] (Visual Basic)]

'Print out the number of iterations in the current @RISK Simulation Settings.

Public Sub DisplayNumIterations

MsgBox Risk.Simulation.Settings.NumIterations

End Sub

See Also

RiskSimulation Object

© Palisade Corporation. All Rights Reserved.

Settings Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 629: RISK Object Library - Palisade Corporation

Description

An object where the @RISK simulation settings are maintained.

For a list of all members defined in this module, see RiskSimulationSettings members.

See Also

RiskSimulationSettings Members

© Palisade Corporation. All Rights Reserved.

RiskSimulationSettings Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 630: RISK Object Library - Palisade Corporation

Public Methods

LoadFromWorkbook Loads the simulation settings stored (if any) in the specified Excel workbook.

ResetToDefaults Resets the @RISK simulation settings back to their defaults.

SaveToWorkbook Saves the current @RISK simulation settings to the specified workbook.

ShowDialog Displays the simulation settings dialog to the user.

SimulationNamesGetArray Retrieves the list of user-defined simulation names.

SimulationNamesSetArray Sets the list of simulation names.

Public Properties

AutomaticallyGenerateReports Controls whether @RISK will automatically generate Excel reports at the end of a simulation.

AutomaticResultsDisplay Controls what results are displayed automatically at the end of an @RISK simulation.

CollectDistributionSamples Controls if @RISK keeps information about samples drawn from input distributions.

ConvergenceConfidenceLevel Controls the confidence level of the confidence monitoring tests on output statistics.

ConvergencePercentileToTest Specifies a percentile to perform convergence monitoring tests on.

ConvergencePerformMeanTest Specifies if a convergence monitoring test should be performed on the output mean.

ConvergencePerformPercentileTest Specifies if a convergence monitoring test should be performed on an output percentile.

ConvergencePerformStdDeviationTest Specifies if a convergence monitoring test should be performed on the output standard deviation.

ConvergenceTestAllOutputs Controls which outputs @RISK will perform convergence monitoring on.

RiskSimulationSettings Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 631: RISK Object Library - Palisade Corporation

ConvergenceTestingEnabled Controls whether @RISK will monitor output convergence during a simulation.

ConvergenceTestingPeriod Controls the number of iterations run between convergence monitor tests.

ConvergenceTolerance Controls the amount of change allowed in an output statistic being monitored, while still considering it to be converged.

LiveUpdate Controls whether open @RISK windows and graphs are updated while a simulation is in progress.

LiveUpdatePeriod Controls the frequency of the update of open @RISK windows and graphs during a simulation.

MacroAfterRecalculation Specifies the name of a macro to run after each iteration's calculation.

MacroAfterRecalculationEnabled Controls whether @RISK will run a macro after each iteration's recalculation.

MacroAfterSimulation Specifies the name of a macro to run after each simulation has completed.

MacroAfterSimulationEnabled Controls whether @RISK will run a macro after each simulation has completed.

MacroBeforeRecalculation Specifies the name of a macro to run before each iteration's calculation.

MacroBeforeRecalculationEnabled Controls whether @RISK will run a macro before each iteration's recalculation.

MacroBeforeSimulation Specifies the name of a macro to run before each simulation starts.

MacroBeforeSimulationEnabled Controls whether @RISK will run a macro before each simulation starts.

MinimizeExcel Controls whether Excel is minimized at the start of an @RISK simulation.

NumIterations Controls the number of iterations in a simulation.

NumSimulations Sets the number of simulations to run in a single 'batch'.

PauseOnOutputErrors Controls whether @RISK will pause in the middle of an @RISK simulation to display errors in an output.

RandomNumberGenerator Controls which random number generator @RISK uses to draw samples.

randomSeed Controls the random number seed used by @RISK when it is drawing samples during a simulation.

RandomSeedChangesForMultipleSimulations Controls how @RISK seeds simulations in a multiple simulation run.

Page 632: RISK Object Library - Palisade Corporation

ReportSelected Controls what reports are generated automatically at the end of an @RISK simulation.

ReportsToGenerate Controls what reports are generated automatically at the end of an @RISK simulation.

SamplingType Specifies whether @RISK should use stratified (Latin Hypercube) sampling or unstratified (Monte Carlo) sampling.

ShowExcelRecalculations Controls whether each Excel spreadsheet recalculation is displayed during an @RISK simulation.

SmartSensitivityAnalysisEnabled Controls whether smart sensitivity analysis is enabled.

StatisticFunctionUpdating Controls when @RISK statistic functions will be updated during a simulation.

StdRecalcBehavior Controls whether the values returned from @RISK functions when a simulation is not running are random or static.

StdRecalcWithoutRiskStatic Controls what values are returned from @RISK functions that do not contain a RiskStatic property function when a

simulation is not running.

StdRecalcWithoutRiskStaticPercentile Controls what percentile values are returned from @RISK functions that do not contain a RiskStatic property function

when a simulation is not running.

UseMultipleCPUs Controls whether @RISK will use multiple CPUs to run an @RISK simulation.

See Also

RiskSimulationSettings Overview

© Palisade Corporation. All Rights Reserved.

Page 633: RISK Object Library - Palisade Corporation

Description

Loads the simulation settings stored (if any) in the specified Excel workbook.

Syntax

Public Function LoadFromWorkbook( _

ByVal p_Workbook As Workbook _

) As Boolean

Parameters

p_Workbook

The workbook from which to load stored @RISK simulation settings.

Return Type

Boolean - TRUE if settings were found and loaded. FALSE if default settings were applied.

Remarks

When you open an Excel workbook that contains @RISK simulation settings (either via Excel's interface or via VBA code) and @RISK simulation settings are already present, you will

receive a query asking you whether you want to use the new settings stored in the workbook.

If you want to suppress this message in code, you can set Risk.DisplayAlerts = FALSE, in which case those settings will not be loaded. To load those settings in code, you can use this

method.

If the specified workbook does not contain any @RISK settings, the return code of the function will be FALSE and the default @RISK simulation settings (as controlled partially by the

Risk.ApplicationSettings object) will be used instead. If settings do exist in the workbook, the return value of this function is TRUE.

Example

[[New Example] (Visual Basic)]

'Open the workbook at C:\MyWorkbook.xls, making sure to use the @RISK simulation settings it contains.

Public Sub OpenWorkbookWithSimulationSettings()

Dim wb As Excel.Workbook

LoadFromWorkbook Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 634: RISK Object Library - Palisade Corporation

Risk.DisplayAlerts = False

Set wb = Workbooks.Open("C:\MyWorkbook.xls")

Risk.DisplayAlerts = True

Risk.Simulation.Settings.LoadFromWorkbook wb

End Sub

See Also

RiskSimulationSettings Object | DisplayAlerts Property | WriteWorkbookInformation Method | ResetToDefaults Method | SaveToWorkbook Method

© Palisade Corporation. All Rights Reserved.

Page 635: RISK Object Library - Palisade Corporation

Description

Resets the @RISK simulation settings back to their defaults.

Syntax

Public Sub ResetToDefaults( _

Optional ByVal p_RemoveSettingsFromOpenWorkbooks As Boolean = False _

)

Parameters

p_RemoveSettingsFromOpenWorkbooks

If TRUE, this method will also remove all simulation settings stored in all currently open workbooks in Excel.

Remarks

The default @RISK simulation settings are partially controlled by the Risk.ApplicationSettings object.

Example

[[New Example] (Visual Basic)]

'Reset the @RISK simulation settings to their default state:

Public Sub ResetSimulationSettings()

Risk.Simulation.Settings.ResetToDefaults

End Sub

See Also

RiskSimulationSettings Object | RiskApplicationSettings Object | LoadFromWorkbook Method | SaveToWorkbook Method

© Palisade Corporation. All Rights Reserved.

ResetToDefaults Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 636: RISK Object Library - Palisade Corporation

Description

Saves the current @RISK simulation settings to the specified workbook.

Syntax

Public Sub SaveToWorkbook( _

ByVal p_Workbook As Workbook _

)

Parameters

p_Workbook

The workbook to which the settings should be saved.

Remarks

When the user saves an Excel workbook with @RISK open, it automatically writes @RISK information into it. This information includes the simulation settings, fit definitions,

and simulation results if appropriate. However, if you save a workbook via code using the Workbook.Save or Workbook.SaveAs methods, this information is not automatically written into

the workbook and you may use this method to do so.

This method only writes the @RISK simulation settings to the workbook. If you want to write all the relevant @RISK information to a workbook, instead call the

Risk.WriteWorkbookInformation method.

Example

[[New Example] (Visual Basic)]

'Saves the current @RISK simulation settings to the active Excel workbook.

Public Sub SaveSimulationSettings()

Risk.Simulation.Settings.SaveToWorkbook ActiveWorkbook

End Sub

See Also

RiskSimulationSettings Object | WriteWorkbookInformation Method | LoadFromWorkbook Method | ResetToDefaults Method

SaveToWorkbook Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 637: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 638: RISK Object Library - Palisade Corporation

Description

Displays the simulation settings dialog to the user.

Syntax

Public Function ShowDialog() As Boolean

Return Type

TRUE if the user accepted the changes, FALSE if the user cancelled the dialog.

See Also

RiskSimulationSettings Object

© Palisade Corporation. All Rights Reserved.

ShowDialog Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 639: RISK Object Library - Palisade Corporation

Description

Retrieves the list of user-defined simulation names.

Syntax

Public Function SimulationNamesGetArray( _

ByRef p_SimulationNames() As String _

) As Integer

Parameters

p_SimulationNames

A 1-based array of strings. If no simulation names have been defined, the returned array will be empty.

Return Type

Integer - the number of names.

Remarks

The number of names here is not necessarily the same as the actual number of simulations that will be run (as defined in the NumSimulations property). If this array is bigger than the

number of simulations run, the extra names will be ignored. If this array is smaller than the number of simulations run, the remaining simulations will revert the a default naming scheme

(Sim #5, Sim #6, etc.)

There can be at most 100 named simulations.

Example

[[New Example] (Visual Basic)]

'Display the simulation names defined by the user.

Public Sub DisplaySimulationNames()

Dim numNames As Integer

Dim simNames() As String

Dim displayString As String

Dim i As Integer

SimulationNamesGetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 640: RISK Object Library - Palisade Corporation

numNames = Risk.Simulation.Settings.SimulationNamesGetArray(simNames)

If numNames = 0 Then

displayString = "No simulation names have been defined."

Else

displayString = "There are " & numNames & " simulation names:"

For i = 1 To numNames

displayString = displayString & vbCrLf & "#" & i & " = " & simNames(i)

Next i

End If

MsgBox displayString

End Sub

See Also

RiskSimulationSettings Object | SimulationNamesSetArray Method | NumSimulations Property

© Palisade Corporation. All Rights Reserved.

Page 641: RISK Object Library - Palisade Corporation

Description

Sets the list of simulation names.

Syntax

Public Sub SimulationNamesSetArray( _

ByRef p_SimulationNames() As String _

)

Parameters

p_SimulationNames

A 1-based array of strings. If no simulation names should be defined, pass an empty array. You can specify a maximum of 100 simulation names.

Remarks

The number of names here is not necessarily the same as the actual number of simulations that will be run (as defined in the NumSimulations property). If this array is bigger than the

number of simulations run, the extra names will be ignored. If this array is smaller than the number of simulations run, the remaining simulations will revert the a default naming scheme

(Sim #5, Sim #6, etc.)

There can be at most 100 named simulations.

Example

[[New Example] (Visual Basic)]

'Run a simulation with 3-named simulations.

Public Sub RunNamedSimulations()

Dim simNames() As String

'Tell @RISK we will be running 3 simulations:

Risk.Simulation.Settings.NumSimulations = 3

'Set up the simulation names for these 3 simulations:

ReDim simNames(1 To 3)

SimulationNamesSetArray Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 642: RISK Object Library - Palisade Corporation

simNames(1) = "First Simulation"

simNames(2) = "Second Simulation"

simNames(3) = "Third Simulation"

Risk.Simulation.Settings.SimulationNamesSetArray simNames

'Actually run the simulation:

Risk.Simulation.Start

End Sub

See Also

RiskSimulationSettings Object | SimulationNamesGetArray Method | NumSimulations Property

© Palisade Corporation. All Rights Reserved.

Page 643: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will automatically generate Excel reports at the end of a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property AutomaticallyGenerateReports() As Boolean

Remarks

The reports to generate are specified with either the ReportsToGenerate or ReportSelected property.

If AutomaticResultsDisplay = RiskDemoMode this property is always False.

Example

[[New Example] (Visual Basic)]

'Set up automatic reports to include both the input and output summary reports:

Public Sub SetUpEndOfSimulationReports()

With Risk.Simulation.Settings

.AutomaticallyGenerateReports = True

.ReportsToGenerate = RiskSimulationReportInputResultsSummary + RiskSimulationReportOutputResultsSummary

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticResultsDisplay Property | ReportSelected Property | ReportsToGenerate Property

AutomaticallyGenerateReports Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 644: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 645: RISK Object Library - Palisade Corporation

Description

Controls what results are displayed automatically at the end of an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property AutomaticResultsDisplay() As RiskAutomaticResultsDisplay

Remarks

In code, you will often want to set this property to RiskNoAutomaticResults.

Setting this property to RiskDemoMode will override several other simulation settings.

The AutomaticallyGenerateReport setting also controls what happens at the end of the simulation.

Example

[[New Example] (Visual Basic)]

'Run an @RISK simulation, making sure not to generate any automatic results when it is done.

Public Sub RunSimulationWithNoAutomaticResults()

Risk.Simulation.Settings.AutomaticResultsDisplay = RiskNoAutomaticResults

Risk.Simulation.Settings.AutomaticallyGenerateReports = False

Riks.Simulation.Start

End Sub

See Also

RiskSimulationSettings Object | AutomaticallyGenerateReports Property | RiskAutomaticResultsDisplay Enumeration

AutomaticResultsDisplay Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 646: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 647: RISK Object Library - Palisade Corporation

Description

Controls if @RISK keeps information about samples drawn from input distributions.

Property type

Read-write property

Syntax (Visual Basic)

Public Property CollectDistributionSamples() As RiskCollectDistributionSamples

Remarks

In order to perform sensitivity and scenario analyses, @RISK needs to keep sample information for the input distributions in your model. However, if your model has a large number of

inputs, this may use a large number of resources. If you are not doing these type of analyses, you can completely disable the collection of input samples my setting this property to

RiskCollectNone. If you have a specific subset of important inputs that you want to include in your analysis but don't need to keep samples for all inputs, you can mark the special inputs

with a RiskCollect() property function, and set this property to RiskCollectMarked.

Example

[[New Example] (Visual Basic)]

'Make @RISK collect distribution samples only for distributions marked with a RiskCollect() property function.

Public Sub CollectOnlyMarkedDistributions()

Risk.Simulation.Settings.CollectDistributionSamples = RiskCollectMarked

End Sub

See Also

RiskSimulationSettings Object | RandomSeed Property | RandomNumberGenerator Property | RandomSeedChangesForMultipleSimulations Property | SamplingType Property

| RiskCollectDistributionSamples Enumeration

CollectDistributionSamples Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 648: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 649: RISK Object Library - Palisade Corporation

Description

Controls the confidence level of the confidence monitoring tests on output statistics.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergenceConfidenceLevel() As Double

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

This is a default property. A specific output may have a RiskConvergence() property function that overrides this value.

This property combined with the ConvergenceTolerance property control how sensitive the convergence monitoring is. For example, if the ConvergenceTolerance = 0.03 and

ConvergenceConfidenceLevel = 0.95 and the testing is being performed on the mean, that is equivalent of saying we want to be 95 percent confident that the simulation mean is within 3

percent of the true value.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

ConvergenceConfidenceLevel Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 650: RISK Object Library - Palisade Corporation

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

End With

End Sub

See Also

RiskSimulationSettings Object | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property | ConvergencePerformPercentileTest Property

| ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 651: RISK Object Library - Palisade Corporation

Description

Specifies a percentile to perform convergence monitoring tests on.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergencePercentileToTest() As Double

Remarks

This property is only relevent if the ConvergenceTestingEnabled and ConvergencePerformPercentileTest properties are both True.

This is a default property. A specific output may have a RiskConvergence() property function that overrides this value.

This value must be between 0 and 1. A value of 0.5 is the 50th percentile.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

ConvergencePercentileToTest Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 652: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePerformMeanTest Property | ConvergencePerformPercentileTest Property

| ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 653: RISK Object Library - Palisade Corporation

Description

Specifies if a convergence monitoring test should be performed on the output mean.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergencePerformMeanTest() As Boolean

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

This is a default property. A specific output may have a RiskConvergence() property function that overrides this value.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

End With

ConvergencePerformMeanTest Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 654: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformPercentileTest Property

| ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

© Palisade Corporation. All Rights Reserved.

Page 655: RISK Object Library - Palisade Corporation

Description

Specifies if a convergence monitoring test should be performed on an output percentile.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergencePerformPercentileTest() As Boolean

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

This is a default property. A specific output may have a RiskConvergence() property function that overrides this value.

The specific percentile to test is specified in the ConvergencePercentileToTest property.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

ConvergencePerformPercentileTest Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 656: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 657: RISK Object Library - Palisade Corporation

Description

Specifies if a convergence monitoring test should be performed on the output standard deviation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergencePerformStdDeviationTest() As Boolean

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

This is a default property. A specific output may have a RiskConvergence() property function that overrides this value.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

End With

ConvergencePerformStdDeviationTest Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 658: RISK Object Library - Palisade Corporation

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformPercentileTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 659: RISK Object Library - Palisade Corporation

Description

Controls which outputs @RISK will perform convergence monitoring on.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergenceTestAllOutputs() As Boolean

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

If this property is TRUE, all outputs in the model will be monitored for convergence. If this property is FALSE, only the ouputs marked with a RiskConvergence() property function iwll be

monitored.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

ConvergenceTestAllOutputs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 660: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformPercentileTest Property | ConvergencePerformStdDeviationTest Property | ConvergenceTestingEnabled Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 661: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will monitor output convergence during a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergenceTestingEnabled() As Boolean

Remarks

This property is always TRUE if NumIterations = RiskAutoNumIterations.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

End With

End Sub

ConvergenceTestingEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 662: RISK Object Library - Palisade Corporation

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformPercentileTest Property | ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingPeriod Property

| ConvergenceTolerance Property | NumIterations Property

© Palisade Corporation. All Rights Reserved.

Page 663: RISK Object Library - Palisade Corporation

Description

Controls the number of iterations run between convergence monitor tests.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergenceTestingPeriod() As Long

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

End With

End Sub

ConvergenceTestingPeriod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 664: RISK Object Library - Palisade Corporation

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformPercentileTest Property | ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property

| ConvergenceTolerance Property

© Palisade Corporation. All Rights Reserved.

Page 665: RISK Object Library - Palisade Corporation

Description

Controls the amount of change allowed in an output statistic being monitored, while still considering it to be converged.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ConvergenceTolerance() As Double

Remarks

This property is only relevent if the ConvergenceTestingEnabled property is True.

This property combined with the ConvergenceConfidenceLevel property control how sensitive the convergence monitoring is. For example, if the ConvergenceTolerance = 0.03 and

ConvergenceConfidenceLevel = 0.95 and the testing is being performed on the mean, that is equivalent of saying we want to be 95 percent confident that the simulation mean is within 3

percent of the true value.

Example

[[New Example] (Visual Basic)]

'Set up convergence monitoring options:

Public Sub SetupConvergenceMonitoring()

With Risk.Simulation.Settings

.ConvergenceTestingEnabled = True

.ConvergenceTestingPeriod = 100

.ConvergenceTestAllOutputs = True

.ConvergenceTolerance = 0.03

.ConvergenceConfidenceLevel = 0.95

.ConvergencePerformMeanTest = True

.ConvergencePerformStdDeviationTest = True

.ConvergencePerformPercentileTest = True

.ConvergencePercentileToTest = 0.9

ConvergenceTolerance Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 666: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | ConvergenceConfidenceLevel Property | ConvergencePercentileToTest Property | ConvergencePerformMeanTest Property

| ConvergencePerformPercentileTest Property | ConvergencePerformStdDeviationTest Property | ConvergenceTestAllOutputs Property | ConvergenceTestingEnabled Property

| ConvergenceTestingPeriod Property

© Palisade Corporation. All Rights Reserved.

Page 667: RISK Object Library - Palisade Corporation

Description

Controls whether open @RISK windows and graphs are updated while a simulation is in progress.

Property type

Read-write property

Syntax (Visual Basic)

Public Property LiveUpdate() As Boolean

Remarks

If AutomaticResultsDisplay = RiskDemoMode, this property is always True.

The frequency of the update is controled by the LiveUpdatePeriod property.

Example

[[New Example] (Visual Basic)]

'Set @RISK's simulation viewing options to their most common configuration:

Public Sub ConfigureSimulationViewOptions()

With Risk.Simulation.Settings

.MinimizeExcel = False

.LiveUpdate = True

.LiveUpdatePeriod = RiskAutoNumSeconds

.ShowExcelRecalculations = False

.PauseOnOutputErrors = False

.AutomaticallyGenerateReports = False

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticResultsDisplay Property | ShowExcelRecalculations Property | LiveUpdatePeriod Property

LiveUpdate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 668: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 669: RISK Object Library - Palisade Corporation

Description

Controls the frequency of the update of open @RISK windows and graphs during a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property LiveUpdatePeriod() As Long

Remarks

The special value of RiskAutoNumSeconds can be used to put the updating frequency under @RISK's control.

If AutomaticResultsDisplay = RiskDemoMode, this property is always RiskAutoNumSeconds.

This property has no effect if LiveUpdate = False.

Example

[[New Example] (Visual Basic)]

'Set @RISK's simulation viewing options to their most common configuration:

Public Sub ConfigureSimulationViewOptions()

With Risk.Simulation.Settings

.MinimizeExcel = False

.LiveUpdate = True

.LiveUpdatePeriod = RiskAutoNumSeconds

.ShowExcelRecalculations = False

.PauseOnOutputErrors = False

.AutomaticallyGenerateReports = False

End With

End Sub

See Also

LiveUpdatePeriod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 670: RISK Object Library - Palisade Corporation

RiskSimulationSettings Object | AutomaticResultsDisplay Property | LiveUpdate Property | RiskAutoNumSeconds Property

© Palisade Corporation. All Rights Reserved.

Page 671: RISK Object Library - Palisade Corporation

Description

Specifies the name of a macro to run after each iteration's calculation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroAfterRecalculation() As String

Remarks

This property only has effect if the MacroAfterRecalculationEnabled property is True.

The specified macro must be a Public Sub which takes no arguments.

To fully qualify the name, prefix the macro name with the workbook name followed by an exclamation point (see the example below). If the exclamation point is missing, the macro is

assumed to be in whatever workbook is active in Excel at the time the simulation starts.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

MacroAfterRecalculation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 672: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | MacroAfterRecalculationEnabled Property | MacroAfterSimulation Property | MacroBeforeRecalculation Property | MacroBeforeSimulation Property

© Palisade Corporation. All Rights Reserved.

Page 673: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will run a macro after each iteration's recalculation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroAfterRecalculationEnabled() As Boolean

Remarks

The specific macro to run is set in the MacroAfterRecalculation property.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

End With

End Sub

See Also

MacroAfterRecalculationEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 674: RISK Object Library - Palisade Corporation

RiskSimulationSettings Object | MacroAfterRecalculation Property | MacroAfterSimulationEnabled Property | MacroBeforeRecalculationEnabled Property

| MacroBeforeSimulationEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 675: RISK Object Library - Palisade Corporation

Description

Specifies the name of a macro to run after each simulation has completed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroAfterSimulation() As String

Remarks

This property only has effect if the MacroAfterSimulationEnabled property is True.

The specified macro must be a Public Sub which takes no arguments.

To fully qualify the name, prefix the macro name with the workbook name followed by an exclamation point (see the example below). If the exclamation point is missing, the macro is

assumed to be in whatever workbook is active in Excel at the time the simulation starts.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

MacroAfterSimulation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 676: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | MacroAfterSimulationEnabled Property | MacroAfterRecalculation Property | MacroBeforeRecalculation Property | MacroBeforeSimulation Property

© Palisade Corporation. All Rights Reserved.

Page 677: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will run a macro after each simulation has completed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroAfterSimulationEnabled() As Boolean

Remarks

The specific macro to run is set in the MacroAfterSimulation property.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

End With

End Sub

See Also

MacroAfterSimulationEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 678: RISK Object Library - Palisade Corporation

RiskSimulationSettings Object | MacroAfterSimulation Property | MacroAfterRecalculationEnabled Property | MacroBeforeRecalculationEnabled Property

| MacroBeforeSimulationEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 679: RISK Object Library - Palisade Corporation

Description

Specifies the name of a macro to run before each iteration's calculation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroBeforeRecalculation() As String

Remarks

This property only has effect if the MacroBeforeRecalculationEnabled property is True.

The specified macro must be a Public Sub which takes no arguments.

To fully qualify the name, prefix the macro name with the workbook name followed by an exclamation point (see the example below). If the exclamation point is missing, the macro is

assumed to be in whatever workbook is active in Excel at the time the simulation starts.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

MacroBeforeRecalculation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 680: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | MacroBeforeRecalculationEnabled Property | MacroAfterRecalculation Property | MacroAfterSimulation Property | MacroBeforeSimulation Property

© Palisade Corporation. All Rights Reserved.

Page 681: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will run a macro before each iteration's recalculation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroBeforeRecalculationEnabled() As Boolean

Remarks

The specific macro to run is set in the MacroBeforeRecalculation property.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

End With

End Sub

See Also

MacroBeforeRecalculationEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 682: RISK Object Library - Palisade Corporation

RiskSimulationSettings Object | MacroBeforeRecalculation Property | MacroAfterRecalculationEnabled Property | MacroAfterSimulationEnabled Property

| MacroBeforeSimulationEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 683: RISK Object Library - Palisade Corporation

Description

Specifies the name of a macro to run before each simulation starts.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroBeforeSimulation() As String

Remarks

This property only has effect if the MacroBeforeSimulationEnabled property is True.

The specified macro must be a Public Sub which takes no arguments.

To fully qualify the name, prefix the macro name with the workbook name followed by an exclamation point (see the example below). If the exclamation point is missing, the macro is

assumed to be in whatever workbook is active in Excel at the time the simulation starts.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

MacroBeforeSimulation Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 684: RISK Object Library - Palisade Corporation

End With

End Sub

See Also

RiskSimulationSettings Object | MacroBeforeSimulationEnabled Property | MacroAfterRecalculation Property | MacroAfterSimulation Property | MacroBeforeRecalculation Property

© Palisade Corporation. All Rights Reserved.

Page 685: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will run a macro before each simulation starts.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MacroBeforeSimulationEnabled() As Boolean

Remarks

The specific macro to run is set in the MacroBeforeSimulation property.

Example

[[New Example] (Visual Basic)]

'Set up the macros to run during an @RISK simulation.

Public Sub SetupSimulationMacros()

With Risk.Simulation.Settings

.MacroBeforeSimulationEnabled = True

.MacroBeforeSimulation = "MyWorkbook!BeforeSim"

.MacroBeforeRecalculationEnabled = True

.MacroBeforeRecalculation = "MyWorkbook!BeforeCalc"

.MacroAfterRecalculationEnabled = True

.MacroAfterRecalculation = "MyWorkbook!AfterCalc"

.MacroAfterSimulationEnabled = True

.MacroAfterSimulation = "MyWorkbook!AfterSim"

End With

End Sub

See Also

MacroBeforeSimulationEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 686: RISK Object Library - Palisade Corporation

RiskSimulationSettings Object | MacroBeforeSimulation Property | MacroAfterRecalculationEnabled Property | MacroAfterSimulationEnabled Property

| MacroBeforeRecalculationEnabled Property

© Palisade Corporation. All Rights Reserved.

Page 687: RISK Object Library - Palisade Corporation

Description

Controls whether Excel is minimized at the start of an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property MinimizeExcel() As Boolean

Remarks

If AutomaticResultsDisplay = RiskDemoMode, this property is always False.

Example

[[New Example] (Visual Basic)]

'Set @RISK's simulation viewing options to their most common configuration:

Public Sub ConfigureSimulationViewOptions()

With Risk.Simulation.Settings

.MinimizeExcel = False

.LiveUpdate = True

.LiveUpdatePeriod = RiskAutoNumSeconds

.ShowExcelRecalculations = False

.PauseOnOutputErrors = False

.AutomaticallyGenerateReports = False

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticResultsDisplay Property | ShowExcelRecalculations Property

MinimizeExcel Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 688: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 689: RISK Object Library - Palisade Corporation

Description

Controls the number of iterations in a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property NumIterations() As Long

Remarks

Use the special value RiskAutoNumIterations to have @RISK use convergence monitoring to determine how many iterations to run. Note: setting NumIterations = RiskAutoNumIterations

will automatically set NumSimulations = 1.

Example

[[New Example] (Visual Basic)]

'Set up a 3 simulation / 250 iteration run and start it:

Public Sub RunSimulation()

Risk.Simulation.Settings.NumIterations = 250

Risk.Simulation.Settings.NumSimulations = 3

Risk.Simulation.Start

End Sub

See Also

RiskSimulationSettings Object | NumSimulations Property | RiskAutoNumIterations Property

© Palisade Corporation. All Rights Reserved.

NumIterations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 690: RISK Object Library - Palisade Corporation

Description

Sets the number of simulations to run in a single 'batch'.

Property type

Read-write property

Syntax (Visual Basic)

Public Property NumSimulations() As Integer

Remarks

If NumIterations = RiskAutoNumIterations, NumSimulations must be 1.

You can name each simulation using the SimulationNamesSetArray method.

Use the RandomSeedChangesForMultipleSimulations property to control if the random numbers generated in each simulation should change or remain the same.

Example

[[New Example] (Visual Basic)]

'Set up a 3 simulation / 250 iteration run and start it:

Public Sub RunSimulation()

Risk.Simulation.Settings.NumIterations = 250

Risk.Simulation.Settings.NumSimulations = 3

Risk.Simulation.Start

End Sub

See Also

RiskSimulationSettings Object | NumIterations Property | RandomSeedChangesForMultipleSimulations Property | SimulationNamesSetArray Method

NumSimulations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 691: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 692: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will pause in the middle of an @RISK simulation to display errors in an output.

Property type

Read-write property

Syntax (Visual Basic)

Public Property PauseOnOutputErrors() As Boolean

Remarks

If AutomaticResultsDisplay = RiskDemoMode, this property is always False.

Example

[[New Example] (Visual Basic)]

'Set @RISK's simulation viewing options to their most common configuration:

Public Sub ConfigureSimulationViewOptions()

With Risk.Simulation.Settings

.MinimizeExcel = False

.LiveUpdate = True

.LiveUpdatePeriod = RiskAutoNumSeconds

.ShowExcelRecalculations = False

.PauseOnOutputErrors = False

.AutomaticallyGenerateReports = False

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticResultsDisplay Property

PauseOnOutputErrors Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 693: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 694: RISK Object Library - Palisade Corporation

Description

Controls which random number generator @RISK uses to draw samples.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RandomNumberGenerator() As RiskRandomNumberGenerator

Remarks

The seed of the random number generator is set with the RandomSeed property.

Example

[[New Example] (Visual Basic)]

'Sets @RISK's simulation sampling options to their most common configuration:

Public Sub ConfigureSimulationSamplingOptions()

With Risk.Simulation.Settings

.SamplingType = RiskLatinHypercube

.RandomNumberGenerator = RiskMersenneTwister

.RandomSeed = RiskAutomaticSeed

.RandomSeedChangesForMultipleSimulations = False

.CollectDistributionSamples = RiskCollectAll

End With

End Sub

See Also

RiskSimulationSettings Object | RandomSeed Property | RandomSeedChangesForMultipleSimulations Property | SamplingType Property | CollectDistributionSamples Property

| RiskRandomNumberGenerator Enumeration

RandomNumberGenerator Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 695: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 696: RISK Object Library - Palisade Corporation

Description

Controls the random number seed used by @RISK when it is drawing samples during a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property randomSeed() As Long

Remarks

The seed must be a number between 1 and 2147483647.

This property can be set to the special value RiskAutomaticSeed which will generate a new seed based on your computer's clock when a new simulation is started.

The random number generator is set using the RandomNumberGeneratorProperty.

The RandomSeedChangesForMultipleSimulations controls how the seed changes if you are performing a multiple simulation run.

Example

[[New Example] (Visual Basic)]

'Sets @RISK's simulation sampling options to their most common configuration:

Public Sub ConfigureSimulationSamplingOptions()

With Risk.Simulation.Settings

.SamplingType = RiskLatinHypercube

.RandomNumberGenerator = RiskMersenneTwister

.RandomSeed = RiskAutomaticSeed

.RandomSeedChangesForMultipleSimulations = False

.CollectDistributionSamples = RiskCollectAll

End With

End Sub

randomSeed Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 697: RISK Object Library - Palisade Corporation

See Also

RiskSimulationSettings Object | RandomNumberGenerator Property | RandomSeedChangesForMultipleSimulations Property | SamplingType Property | CollectDistributionSamples

Property

© Palisade Corporation. All Rights Reserved.

Page 698: RISK Object Library - Palisade Corporation

Description

Controls how @RISK seeds simulations in a multiple simulation run.

Property type

Read-write property

Syntax (Visual Basic)

Public Property RandomSeedChangesForMultipleSimulations() As Boolean

Remarks

If this property is False, each simulation in the multiple simulation run will have the same random number stream.

If this property is True, each simulation will be seeded differently. However, if you set a fixed random number seed, the entire run as a whole will still be reproducible.

Example

[[New Example] (Visual Basic)]

'Sets @RISK's simulation sampling options to their most common configuration:

Public Sub ConfigureSimulationSamplingOptions()

With Risk.Simulation.Settings

.SamplingType = RiskLatinHypercube

.RandomNumberGenerator = RiskMersenneTwister

.RandomSeed = RiskAutomaticSeed

.RandomSeedChangesForMultipleSimulations = False

.CollectDistributionSamples = RiskCollectAll

End With

End Sub

See Also

RiskSimulationSettings Object | RandomNumberGenerator Property | RandomSeed Property | SamplingType Property | CollectDistributionSamples Property

RandomSeedChangesForMultipleSimulations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 699: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 700: RISK Object Library - Palisade Corporation

Description

Controls what reports are generated automatically at the end of an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportSelected( _

ByVal p_WhichReport As RiskReportSelection _

) As Boolean

Parameters

p_WhichReport

Value Description

RiskSimulationReportQuick A "Quick" Report, one page per output, with a summary of the most important information for each output.

RiskSimulationReportInputResultsSummary A summary report of all the simulated inputs. This matches the information in the Input tab of the @RISK Results

Summary window.

RiskSimulationReportOutputResultsSummary A summary report of all the simulated outputs. This matches the information in the Output tab of the @RISK Results

Summary window.

RiskSimulationReportDetailedStatistics A set of detailed statistical results for all inputs and outputs. This matches the information in the @RISK Detailed

Statistics window.

RiskSimulationReportData The complete set of simulation data for all inputs and outputs. This matches the information in the @RISK Data

window.

RiskSimulationReportSensitivity The sensitivity results for all outputs. This matches the information in the @RISK Sensitivities window.

RiskSimulationReportScenarios The scenarios report for all outputs. This matches the information in the @RISK Scenarios window.

ReportSelected Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 701: RISK Object Library - Palisade Corporation

RiskSimulationReportTemplateSheets A static copy of all open template sheet. Template sheets must start with the prefix "RiskTemplate_".

RiskModelReportInputs A report summarizing all the currently defined inputs. This matches the information in the Inputs tab of the @RISK

Model window.

RiskModelReportOutputs A report summarizing all the currently defined outputs. This matches the information in the Outputs tab of

the @RISK Model window.

RiskModelReportCorrelations A report summarizing all the currently defined correlations. This matches the information in the Correlations tab of

the @RISK Model window.

Remarks

This property controls which reports will be generated automatically at the end of an @RISK simulation if the AutomaticallyGenerateReports property is True.

You can also set this information in a 'bit-packed' format using the ReportsToGenerate property.

Example

[[New Example] (Visual Basic)]

'Set up automatic reports to include both the input and output summary reports:

Public Sub SetUpEndOfSimulationReports2()

With Risk.Simulation.Settings

.AutomaticallyGenerateReports = True

.ReportSelected(RiskSimulationReportInputResultsSummary) = True

.ReportSelected(RiskSimulationReportOutputResultsSummary) = True

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticallyGenerateReports Property | ReportSelected Property | RiskReportSelection Enumeration

© Palisade Corporation. All Rights Reserved.

Page 702: RISK Object Library - Palisade Corporation

Description

Controls what reports are generated automatically at the end of an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportsToGenerate() As RiskReportSelection

Remarks

This property controls which reports will be generated automatically at the end of an @RISK simulation if the AutomaticallyGenerateReports property is True.

This property returns a "bit-packed" version of this information. That is, the value is the sum of the constant values of each selected report. You can also set this information for individual

reports using the ReportSelected property.

Example

[[New Example] (Visual Basic)]

'Set up automatic reports to include both the input and output summary reports:

Public Sub SetUpEndOfSimulationReports()

With Risk.Simulation.Settings

.AutomaticallyGenerateReports = True

.ReportsToGenerate = RiskSimulationReportInputResultsSummary + RiskSimulationReportOutputResultsSummary

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticallyGenerateReports Property | ReportSelected Property | RiskReportSelection Enumeration

ReportsToGenerate Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 703: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 704: RISK Object Library - Palisade Corporation

Description

Specifies whether @RISK should use stratified (Latin Hypercube) sampling or unstratified (Monte Carlo) sampling.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SamplingType() As RiskSamplingType

Example

[[New Example] (Visual Basic)]

'Sets @RISK's simulation sampling options to their most common configuration:

Public Sub ConfigureSimulationSamplingOptions()

With Risk.Simulation.Settings

.SamplingType = RiskLatinHypercube

.RandomNumberGenerator = RiskMersenneTwister

.RandomSeed = RiskAutomaticSeed

.RandomSeedChangesForMultipleSimulations = False

.CollectDistributionSamples = RiskCollectAll

End With

End Sub

See Also

RiskSimulationSettings Object | RandomNumberGenerator Property | RandomSeed Property | RandomSeedChangesForMultipleSimulations Property | CollectDistributionSamples

Property | RiskSamplingType Enumeration

SamplingType Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 705: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 706: RISK Object Library - Palisade Corporation

Description

Controls whether each Excel spreadsheet recalculation is displayed during an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ShowExcelRecalculations() As Boolean

Remarks

If AutomaticResultsDisplay = RiskDemoMode, this property is always True.

If the MinimizeExcel property is True, this setting has no effect.

Example

[[New Example] (Visual Basic)]

'Set @RISK's simulation viewing options to their most common configuration:

Public Sub ConfigureSimulationViewOptions()

With Risk.Simulation.Settings

.MinimizeExcel = False

.LiveUpdate = True

.LiveUpdatePeriod = RiskAutoNumSeconds

.ShowExcelRecalculations = False

.PauseOnOutputErrors = False

.AutomaticallyGenerateReports = False

End With

End Sub

See Also

RiskSimulationSettings Object | AutomaticResultsDisplay Property | MinimizeExcel Property | LiveUpdate Property

ShowExcelRecalculations Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 707: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 708: RISK Object Library - Palisade Corporation

Description

Controls whether smart sensitivity analysis is enabled.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SmartSensitivityAnalysisEnabled() As Boolean

See Also

RiskSimulationSettings Object

© Palisade Corporation. All Rights Reserved.

SmartSensitivityAnalysisEnabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 709: RISK Object Library - Palisade Corporation

Description

Controls when @RISK statistic functions will be updated during a simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StatisticFunctionUpdating() As RiskStatisticFunctionUpdating

See Also

RiskSimulationSettings Object | RiskStatisticFunctionUpdating Enumeration

© Palisade Corporation. All Rights Reserved.

StatisticFunctionUpdating Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 710: RISK Object Library - Palisade Corporation

Description

Controls whether the values returned from @RISK functions when a simulation is not running are random or static.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StdRecalcBehavior() As RiskStandardRecalcBehavior

Remarks

This property indicates whether random or static values should be returned from @RISK functions when a simulation is not running. Setting this property equal to RiskRandomValues will

cause the Excel to generate a single random sample each time Excel is recalculated (either automatically or when you press the F9 key.) Setting this property to RiskStaticValues values

will return the current static value defined for the function, or if there isn't one, a value based on the StdRecalcWithoutRiskStatic and StdRecalcWithoutRiskStaticPercentile properties.

Example

[[New Example] (Visual Basic)]

'Set the standard Excel recalculation to return either the value specified in a RiskStatic property

'function, if there is one, or the 75 percentile of the distributions lacking a RiskStatic.

Public Sub ChangeStdRecalcSettings()

With Risk.Simulation.Settings

.StdRecalcBehavior = RiskStaticValues

.StdRecalcWithoutRiskStatic = RiskPercentileValue

.StdRecalcWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskSimulationSettings Object | StdRecalcWithoutRiskStatic Property | StdRecalcWithoutRiskStaticPercentile Property

StdRecalcBehavior Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 711: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 712: RISK Object Library - Palisade Corporation

Description

Controls what values are returned from @RISK functions that do not contain a RiskStatic property function when a simulation is not running.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StdRecalcWithoutRiskStatic() As RiskStaticValueType

Remarks

This property indicates what values @RISK should return from distributions when a simulation is not running. This property is only relevent when the StdRecalcBehavoir is set to

RiskStaticValues, and it only applies to those distributions functions that do not contain a RiskStatic property function.

If this property is set to RiskPercentileValue, you must also supply which percentile to use in the StdRecalcWithoutStaticPercentile property.

Example

[[New Example] (Visual Basic)]

'Set the standard Excel recalculation to return either the value specified in a RiskStatic property

'function, if there is one, or the 75 percentile of the distributions lacking a RiskStatic.

Public Sub ChangeStdRecalcSettings()

With Risk.Simulation.Settings

.StdRecalcBehavior = RiskStaticValues

.StdRecalcWithoutRiskStatic = RiskPercentileValue

.StdRecalcWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskSimulationSettings Object | StdRecalcBehavior Property | StdRecalcWithoutRiskStaticPercentile Property

StdRecalcWithoutRiskStatic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 713: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 714: RISK Object Library - Palisade Corporation

Description

Controls what percentile values are returned from @RISK functions that do not contain a RiskStatic property function when a simulation is not running.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StdRecalcWithoutRiskStaticPercentile() As Double

Remarks

This property indicates what percentile values @RISK should return from distributions when a simulation is not running. This property is only relevent when the StdRecalcBehavoir is set

to RiskStaticValues, StdRecalcWithoutRiskStatic is set to RiskPercentileValue, and it only applies to those distributions functions that do not contain a RiskStatic property function.

The percentile values must be between 0 and 1.

Example

[[New Example] (Visual Basic)]

'Set the standard Excel recalculation to return either the value specified in a RiskStatic property

'function, if there is one, or the 75 percentile of the distributions lacking a RiskStatic.

Public Sub ChangeStdRecalcSettings()

With Risk.Simulation.Settings

.StdRecalcBehavior = RiskStaticValues

.StdRecalcWithoutRiskStatic = RiskPercentileValue

.StdRecalcWithoutRiskStaticPercentile = 0.75

End With

End Sub

See Also

RiskSimulationSettings Object | StdRecalcBehavior Property | StdRecalcWithoutRiskStatic Property

StdRecalcWithoutRiskStaticPercentile Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 715: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 716: RISK Object Library - Palisade Corporation

Description

Controls whether @RISK will use multiple CPUs to run an @RISK simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property UseMultipleCPUs() As Boolean

Remarks

This feature requires the Industrial edition of @RISK. This property can not be set in the other editions and will always return FALSE.

Example

[[New Example] (Visual Basic)]

'Run a simulation with multiple CPU support enabled:

Public Sub RunSimulationWithMultipleCPUs()

Risk.Simulation.Settings.UseMultipleCPUs = True

Risk.Simulation.Start

End Sub

See Also

RiskSimulationSettings Object | Edition Property

© Palisade Corporation. All Rights Reserved.

UseMultipleCPUs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 717: RISK Object Library - Palisade Corporation

Description

Defines a stress analysis.

For a list of all members defined in this module, see RiskStressAnalysis members.

Object Model

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

See Also

RiskStressAnalysis Members | NewStressAnalysis Method | RiskStressInput Object | RiskStressInputCollection Object

RiskStressAnalysis Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 718: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 719: RISK Object Library - Palisade Corporation

Public Methods

RunAnalysis Runs the analysis defined in the object.

WriteSettingsToWorkbook Writes the current object settings to the specified workbook.

Public Properties

IncludeBoxWhiskerPlot Specifies whether the analysis results should include a box-whisker plot.

IncludeComparisonGraphs Specifies whether the analysis results should include comparison graphs.

IncludeHistogramsAndCDFs Specifies whether the analysis results should include histograms and cumulative distribution function (CDF) graphs.

IncludeQuickReport Specifies whether the analysis results should include an output quick report.

IncludeSummaryReport Specifies whether the analysis results should include a summary report.

Inputs Returns a collection of stress analysis inputs.

OutputCell Specifies the stress analysis output cell.

ReportPlacement Specifies what workbook the analysis report will be placed in.

StressMultipleInputsSimulataneously Specifies if multiple inputs are stressed simultaneously in a single simulation.

See Also

RiskStressAnalysis Overview | NewStressAnalysis Method | RiskStressInput Object | RiskStressInputCollection Object

RiskStressAnalysis Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 720: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 721: RISK Object Library - Palisade Corporation

Description

Runs the analysis defined in the object.

Syntax

Public Sub RunAnalysis()

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

See Also

RiskStressAnalysis Object

RunAnalysis Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 722: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 723: RISK Object Library - Palisade Corporation

Description

Writes the current object settings to the specified workbook.

Syntax

Public Sub WriteSettingsToWorkbook( _

ByVal p_Workbook As Workbook _

)

Parameters

p_Workbook

The Excel workbook where the goal seek settings are to be written.

Remarks

Once settings are written, they can be retrieved when creating a new RiskStressAnalysis object by specifying the SourceWorkbook parameter.

See Also

RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

WriteSettingsToWorkbook Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 724: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a box-whisker plot.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeBoxWhiskerPlot() As Boolean

See Also

RiskStressAnalysis Object | IncludeComparisonGraphs Property | IncludeHistogramsAndCDFs Property | IncludeQuickReport Property | IncludeSummaryReport Property

© Palisade Corporation. All Rights Reserved.

IncludeBoxWhiskerPlot Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 725: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include comparison graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeComparisonGraphs() As Boolean

See Also

RiskStressAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeHistogramsAndCDFs Property | IncludeQuickReport Property | IncludeSummaryReport Property

© Palisade Corporation. All Rights Reserved.

IncludeComparisonGraphs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 726: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include histograms and cumulative distribution function (CDF) graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeHistogramsAndCDFs() As Boolean

See Also

RiskStressAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeComparisonGraphs Property | IncludeQuickReport Property | IncludeSummaryReport Property

© Palisade Corporation. All Rights Reserved.

IncludeHistogramsAndCDFs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 727: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include an output quick report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeQuickReport() As Boolean

See Also

RiskStressAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeComparisonGraphs Property | IncludeHistogramsAndCDFs Property | IncludeSummaryReport Property

© Palisade Corporation. All Rights Reserved.

IncludeQuickReport Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 728: RISK Object Library - Palisade Corporation

Description

Specifies whether the analysis results should include a summary report.

Property type

Read-write property

Syntax (Visual Basic)

Public Property IncludeSummaryReport() As Boolean

See Also

RiskStressAnalysis Object | IncludeBoxWhiskerPlot Property | IncludeComparisonGraphs Property | IncludeHistogramsAndCDFs Property | IncludeQuickReport Property

© Palisade Corporation. All Rights Reserved.

IncludeSummaryReport Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 729: RISK Object Library - Palisade Corporation

Description

Returns a collection of stress analysis inputs.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Inputs() As RiskStressInputCollection

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

See Also

RiskStressAnalysis Object | RiskStressInputCollection Object | RiskStressInput Object

Inputs Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 730: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 731: RISK Object Library - Palisade Corporation

Description

Specifies the stress analysis output cell.

Property type

Read-write property

Syntax (Visual Basic)

Public Property OutputCell() As Range

Remarks

The cell must be an @RISK output. If a cell that is not an @RISK output is selected, it will automatically become an @RISK output when the analysis is run.

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

OutputCell Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 732: RISK Object Library - Palisade Corporation

See Also

RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

Page 733: RISK Object Library - Palisade Corporation

Description

Specifies what workbook the analysis report will be placed in.

Property type

Read-write property

Syntax (Visual Basic)

Public Property ReportPlacement() As RiskReportPlacement

See Also

RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

ReportPlacement Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 734: RISK Object Library - Palisade Corporation

Description

Specifies if multiple inputs are stressed simultaneously in a single simulation.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StressMultipleInputsSimulataneously() As Boolean

Remarks

If this property is TRUE, a single simulation will be run that stresses all the stressed inputs simultaneously. If FALSE, each input will be stressed individually in it's own simulation.

See Also

RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

StressMultipleInputsSimulataneously Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 735: RISK Object Library - Palisade Corporation

Description

Defines an input for a stress analysis.

For a list of all members defined in this module, see RiskStressInput members.

Example

[Visual Basic]

'Run a stress analysis on the output in cell B5, while stressing the input

'in cell A1 in its upper 5 percentiles.

Public Sub RunStressAnalysis()

With Risk.Simulation.NewStressAnalysis()

Set .OutputCell = ActiveSheet.Range("B5")

With .Inputs.Add(ActiveSheet.Range("A1"))

.PercentileMin = 0.95

.PercentileMax = 1

End With

.RunAnalysis

End With

End Sub

See Also

RiskStressInput Members | RiskStressInputCollection Object | RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

RiskStressInput Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 736: RISK Object Library - Palisade Corporation

Public Methods

AddInputReference Adds an input reference to this object.

ClearInputReferences Clears all input references.

GetInputReferenceInfo Retrieves information about a single input reference.

RemoveInputReference Removes an input reference.

Public Properties

Enabled Specifies whether this input is enabled.

InputReferenceCount Returns the number of cell/function references in this input.

PercentileMax The maximum percentile allowed for the input.

PercentileMin The minimum percentile allowed for the input.

StressMethod Specifies how the input will be stressed.

SubstitutionFunction A function that replaces the distribution function during the stressing process.

See Also

RiskStressInput Overview | RiskStressInputCollection Object | RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

RiskStressInput Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 737: RISK Object Library - Palisade Corporation

Description

Adds an input reference to this object.

Syntax

Public Sub AddInputReference( _

ByVal p_Cell As Range, _

Optional ByRef p_DistributionFunctionPosition As Integer = 1 _

)

Parameters

p_Cell

Specifies a cell reference for the input reference. This must be a single cell.

p_DistributionFunctionPosition

Optionally specifies an @RISK functional position for the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates

the first @RISK distribution, 2 the second, and so on.

Remarks

When an input if created with Add Method, you can specify a single input cell, and function position. If that is the only cell reference you want in the input, you need do nothing else.

However, you may want to specify a compound input with more than one cell reference in a single input. In that case, this method must be used to add that additional items.

Example

[Visual Basic]

'Add a compound input with three cells (A1, A2, and A3) all which are constrained to sample

'within the top 5%.

Public Sub AddCompoundStressInput(ByVal p_Analysis As RiskStressAnalysis)

With p_Analysis.Inputs.Add()

.AddInputReference ActiveSheet.Range("A1")

.AddInputReference ActiveSheet.Range("A2")

.AddInputReference ActiveSheet.Range("A3")

.StressMethod = RiskStressPercentileRange

AddInputReference Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 738: RISK Object Library - Palisade Corporation

.PercentileMin = 0.95

.PercentileMax = 1

End With

End Sub

See Also

RiskStressInput Object | ClearInputReferences Method | GetInputReferenceInfo Method | RemoveInputReference Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

Page 739: RISK Object Library - Palisade Corporation

Description

Clears all input references.

Syntax

Public Sub ClearInputReferences()

See Also

RiskStressInput Object | AddInputReference Method | GetInputReferenceInfo Method | RemoveInputReference Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

ClearInputReferences Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 740: RISK Object Library - Palisade Corporation

Description

Retrieves information about a single input reference.

Syntax

Public Function GetInputReferenceInfo( _

ByVal p_Index As Integer, _

Optional ByRef p_Cell As Range, _

Optional ByRef p_DistributionFunctionPosition As Integer _

) As Range

Parameters

p_Index

Indicates for which input reference information is being sought.

p_Cell

Returns the single cell where the input reference is located.

p_DistributionFunctionPosition

The functional position of the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates the first @RISK distribution,

2 the second, and so on.

See Also

RiskStressInput Object | AddInputReference Method | ClearInputReferences Method | RemoveInputReference Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

GetInputReferenceInfo Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 741: RISK Object Library - Palisade Corporation

Description

Removes an input reference.

Syntax

Public Sub RemoveInputReference( _

ByVal p_Index As Integer _

)

Parameters

p_Index

The index of the input reference being removed.

See Also

RiskStressInput Object | AddInputReference Method | ClearInputReferences Method | GetInputReferenceInfo Method | InputReferenceCount Property

© Palisade Corporation. All Rights Reserved.

RemoveInputReference Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 742: RISK Object Library - Palisade Corporation

Description

Specifies whether this input is enabled.

Property type

Read-write property

Syntax (Visual Basic)

Public Property Enabled() As Boolean

Remarks

Disabled inputs are not included in the analysis. By default inputs are enabled.

See Also

RiskStressInput Object

© Palisade Corporation. All Rights Reserved.

Enabled Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 743: RISK Object Library - Palisade Corporation

Description

Returns the number of cell/function references in this input.

Property type

Read-only property

Syntax (Visual Basic)

Public Property InputReferenceCount() As Integer

See Also

RiskStressInput Object | AddInputReference Method | ClearInputReferences Method | GetInputReferenceInfo Method | RemoveInputReference Method

© Palisade Corporation. All Rights Reserved.

InputReferenceCount Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 744: RISK Object Library - Palisade Corporation

Description

The maximum percentile allowed for the input.

Property type

Read-write property

Syntax (Visual Basic)

Public Property PercentileMax() As Double

Remarks

This property only has effect if the StressMethod Property is set to RiskStressPercentileRange.

Example

[Visual Basic]

'Add a stress input at cell A1 that is restricted to the lowest 5th percentile.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskStressAnalysis)

With p_Analysis.Inputs.Add(ActiveSheet("A1"))

.StressMethod = RiskStressPercentileRange

.PercentileMin = 0

.PercentileMax = 0.05

End With

End Sub

See Also

RiskStressInput Object | PercentileMin Property | StressMethod Property | SubstitutionFunction Property

PercentileMax Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 745: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 746: RISK Object Library - Palisade Corporation

Description

The minimum percentile allowed for the input.

Property type

Read-write property

Syntax (Visual Basic)

Public Property PercentileMin() As Double

Remarks

This property only has effect if the StressMethod Property is set to RiskStressPercentileRange.

Example

[Visual Basic]

'Add a stress input at cell A1 that is restricted to the lowest 5th percentile.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskStressAnalysis)

With p_Analysis.Inputs.Add(ActiveSheet("A1"))

.StressMethod = RiskStressPercentileRange

.PercentileMin = 0

.PercentileMax = 0.05

End With

End Sub

See Also

RiskStressInput Object | PercentileMax Property | StressMethod Property | SubstitutionFunction Property

PercentileMin Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 747: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 748: RISK Object Library - Palisade Corporation

Description

Specifies how the input will be stressed.

Property type

Read-write property

Syntax (Visual Basic)

Public Property StressMethod() As RiskStressMethod

Example

[Visual Basic]

'Add a stress input at cell A1 that is restricted to the lowest 5th percentile.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskStressAnalysis)

With p_Analysis.Inputs.Add(ActiveSheet("A1"))

.StressMethod = RiskStressPercentileRange

.PercentileMin = 0

.PercentileMax = 0.05

End With

End Sub

See Also

RiskStressInput Object | PercentileMax Property | PercentileMin Property | SubstitutionFunction Property

© Palisade Corporation. All Rights Reserved.

StressMethod Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 749: RISK Object Library - Palisade Corporation

Description

A function that replaces the distribution function during the stressing process.

Property type

Read-write property

Syntax (Visual Basic)

Public Property SubstitutionFunction() As String

Remarks

This property only has effect if the StressMethod Property is set to RiskStressSubstituteFunction.

See Also

RiskStressInput Object | PercentileMax Property | PercentileMin Property | StressMethod Property

© Palisade Corporation. All Rights Reserved.

SubstitutionFunction Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 750: RISK Object Library - Palisade Corporation

Description

A collection of RiskStressInput Objects.

For a list of all members defined in this module, see RiskStressInputCollection members.

Object Model

See Also

RiskStressInputCollection Members | RiskStressInput Object | RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

RiskStressInputCollection Collection

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 751: RISK Object Library - Palisade Corporation

Public Methods

Add Adds a new stress input to the collection.

Public Properties

Count Returns the number of items in the collection.

Item Returns a single item in the collection.

See Also

RiskStressInputCollection Overview | RiskStressInput Object | RiskStressAnalysis Object

© Palisade Corporation. All Rights Reserved.

RiskStressInputCollection Collection Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 752: RISK Object Library - Palisade Corporation

Description

Adds a new stress input to the collection.

Syntax

Public Function Add( _

Optional ByVal p_InputReferenceCell As Range = Nothing, _

Optional ByRef p_DistributionFunctionPosition As Integer = 1 _

) As RiskStressInput

Parameters

p_InputReferenceCell

Optionally specifies a cell reference for the input. This must be a single cell. (Multiple cell references many be added to the same stress input by calling the AddInputReference

Method multiple times for an input.)

p_DistributionFunctionPosition

Optionally specifies an @RISK functional position for the input. This is only needed if there is more than one @RISK distribution in the same cell. In that case, the value 1 indicates

the first @RISK distribution, 2 the second, and so on.

Example

[Visual Basic]

'Add a stress input at cell A1 that is restricted to the lowest 5th percentile.

Public Sub AddSensitivityInput(ByVal p_Analysis As RiskStressAnalysis)

With p_Analysis.Inputs.Add(ActiveSheet("A1"))

.StressMethod = RiskStressPercentileRange

.PercentileMin = 0

.PercentileMax = 0.05

End With

End Sub

See Also

Add Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 753: RISK Object Library - Palisade Corporation

RiskStressInputCollection Collection | RiskStressInput Object

© Palisade Corporation. All Rights Reserved.

Page 754: RISK Object Library - Palisade Corporation

Description

Returns the number of items in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Count() As Integer

See Also

RiskStressInputCollection Collection

© Palisade Corporation. All Rights Reserved.

Count Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 755: RISK Object Library - Palisade Corporation

Description

Returns a single item in the collection.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Item( _

ByVal p_Index As Variant _

) As RiskStressInput

Parameters

p_Index

Must be a number between 1 and the number of items in the collection.

See Also

RiskStressInputCollection Collection

© Palisade Corporation. All Rights Reserved.

Item Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 756: RISK Object Library - Palisade Corporation

Description

An enumeration of possible advanced sensitivity variation methods.

Members

Member Description

RiskVariationPercentChangeFromBaseValue Variation is a percentage change from a specified base value.

RiskVariationActualChangeFromBaseValue Variation is an actual change from a specified base value.

RiskVariationMinMaxRange Variation is across a specified min/max range.

RiskVariationDistributionPercentiles Variation is controlled by a specified array of percentiles.

RiskVariationValuesFromTable Variation is controlled by a specified table of values.

RiskVariationValuesFromExcelRange Variations is controlled by a set of values taken from an Excel range.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskAdvSensVariationMethod Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 757: RISK Object Library - Palisade Corporation

Description

An enumeration of the possible automatic results (if any) that can be automatically displayed when a @RISK simulation is run.

Members

Member Description

RiskShowOutputGraph A graph of the output or input in the currently active cell will be displayed while the simulation proceeds, and @RISK will

be put into 'Result Browsing' mode at the end of the simulation. (If no output exists in the currently active cell, @RISK

will change the selection to find one.)

RiskShowResultsSummaryWindow The results summary window, showing a table of all @RISK outputs and inputs will be displayed.

RiskNoAutomaticResults @RISK will not automatically display any results. This is a useful mode for maco code.

RiskDemoMode @RISK will be in a special mode where each iteration of the simulation is displayed to the user. This is useful mode for

explaining how @RISK works to people unfamiliar with Monte-Carlo simulation.

See Also

RiskConstants Object | AutomaticResultsDisplay Property

© Palisade Corporation. All Rights Reserved.

RiskAutomaticResultsDisplay Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 758: RISK Object Library - Palisade Corporation

Members

Member Description

RiskBatchFitStandardReport

RiskBatchFitLiveReport

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskBatchFitReportStyle Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 759: RISK Object Library - Palisade Corporation

Description

An enumeration of different ways @RISK can automatically format spreadsheet cells containing @RISK inputs or outputs.

Members

Member Description

RiskCellFormattingNone No automatically formatting will be performed.

RiskCellFormattingBackgroundColor The background color of the cell will be changed.

RiskCellFormattingFontColor The cell's font color will be changed.

RiskCellFormattingBorderColor The cell's border color will be changed.

RiskCellFormattingFontAndBorderColor The cell's border and font color will be changed.

See Also

RiskConstants Object | CellFormattingStyle Property | CellFormattingInputColor Property | CellFormattingOutputColor Property

© Palisade Corporation. All Rights Reserved.

RiskCellFormattingStyle Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 760: RISK Object Library - Palisade Corporation

Description

An enumerated list of possible ways distribution samples can be collected.

Members

Member Description

RiskCollectNone No input distribution samples will be collected.

RiskCollectMarked Only input distributions marked with a RiskCollect() property function will be collected.

RiskCollectAll All input distributions will be collected.

See Also

RiskConstants Object | CollectDistributionSamples Property

© Palisade Corporation. All Rights Reserved.

RiskCollectDistributionSamples Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 761: RISK Object Library - Palisade Corporation

Description

An enumeration of distribution graph display formats.

Members

Member Description

RiskAutomaticDistributionFormat The format of the graph will change based on the context of what is being displayed.

RiskProbabilityDensity Probability density values. Can not be used for discrete graphs.

RiskRelativeFrequency Relative frequency values. Can not be used for discrete graphs. Requires the binning of theoretical data.

RiskDiscreteProbability Discrete probability values. Can not be used for continuous graphs.

RiskCumulativeAscending Cumulative ascending values. (The y-value is the probability of finding a value at the specified x-value or less.)

RiskCumulativeDescending Cumulative descending values. (The y-value is the probability of finding a value higher than the specified x-value.)

See Also

RiskConstants Object | GraphPreferredDistributionFormat Property

© Palisade Corporation. All Rights Reserved.

RiskDistributionDisplayFormat Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 762: RISK Object Library - Palisade Corporation

Description

An enumerated list of secondary y-axis overlays.

Members

Member Description

RiskOverlayNone No overlay.

RiskOverlayCumulativeAscending A cumulative ascending overlay.

RiskOverlayCumulativeDescending A cumulative descending overlay.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskDistributionSecondaryAxisOverlay Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 763: RISK Object Library - Palisade Corporation

Description

An enumeration of possible truncation parameters.

Members

Member Description

RiskNoTruncation No truncation.

RiskValueTruncation Truncation based on absolute min/max values.

RiskPercentileTruncation Truncation based on percentiles.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskDistributionTruncation Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 764: RISK Object Library - Palisade Corporation

Description

An enumerated list of @RISK product editions.

Members

Member Description

RiskStandardEdition Standard Edition. The base edition of @RISK.

RiskProfessionalEdition Professional Edition. Includes all Standard Edition features plus distribution fitting, advanced analyses, @RISK Library,

and developer's kit support.

RiskIndustrialEdition Industrial Edition. Includes all Professional Edition features and multiple CPU simulation support.

See Also

RiskConstants Object | Edition Property

© Palisade Corporation. All Rights Reserved.

RiskEdition Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 765: RISK Object Library - Palisade Corporation

Description

An enumeration of bin arrangments that can be used for the chi-squared goodness-of-fit test.

Members

Member Description

RiskEqualIntervals The bins all have equal widths (except potentially the first and last bins which can be made to extend to negative or

positive infinity.)

RiskEqualProbabilities The bins all have equal probabilities (in terms of the fitted distribution). For discrete distributions this can only be done

approximately. Note: In this arrangement, the binning will change for each fit performed.

RiskCustomBins A custom bin arrangement is defined.

See Also

RiskConstants Object | ChiSqBinArrangement Property

© Palisade Corporation. All Rights Reserved.

RiskFitChiSqBinArrangement Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 766: RISK Object Library - Palisade Corporation

Description

An enumeration of the possible types of input data for a fitting operation.

Members

Member Description

RiskFitContinuousSamples The data are continuous.

RiskFitDiscreteSamples The data are discrete, integer values.

RiskFitCountedDiscreteSamples The data are discrete, integer values and must arranged in two columns. The first column contains the sample value.

The second column contains the number of samples at that value.

RiskFitUnnormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first

column contains the x-values, while the second contains the y-values. No normalization transformation is applied to the

data before fitting.

RiskFitNormalizedDensityPoints The data are (x,y) points that define a continuous density curve. The data must be arranged in two columns. The first

column contains the x-values, while the second contains the y-values. Before fitting occurs, the data is transformed so

that the area under the curve defined by the data (assuming linear extrapolation between data points) is equal to one.

RiskFitCumulativePoints The data are (x,p) points that define a continuous cumulative curve. The data must be arranged in two columns. The

first column contains the x-values, while the second contains the p-values.

See Also

RiskConstants Object | DataType Property | DataRange Property

© Palisade Corporation. All Rights Reserved.

RiskFitDataType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 767: RISK Object Library - Palisade Corporation

Description

An enumeration of the possible fit filters that can be applied.

Members

Member Description

RiskFitFilterOff No filter is applied.

RiskFitFilterAbsolute A filter is specified with a specific minimum and maximum value.

RiskFitFilterRelative A filter is specified in terms of the number of standard deviations beyond which data is ignored.

See Also

RiskConstants Object | FilterType Property | FilterMinimum Property | FilterMaximum Property | FilterNumStdDeviations Property

© Palisade Corporation. All Rights Reserved.

RiskFitFilterType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 768: RISK Object Library - Palisade Corporation

Description

An enumeration of possible limits (or boundary conditions) that can be applied to an extremum of a distribution.

Members

Member Description

RiskUnsureLimit No information is known about the boundary. This is the default, and this works effectively as a combination of

RiskOpenLimit (for distributions with asymptotic limits) and RiskBoundedButUnknownLimit (for distributions with finite

limits).

RiskOpenLimit Only distributions with an asymptotic limits will be considered.

RiskBoundedButUnknownLimit Only distributions with bounded limits will be considered, but the value of this limit is considered to be adjustable.

RiskFixedLimit Only distributions with bounded limits will be considered, and those limits will be fixed at a specified value.

See Also

RiskConstants Object | LowerLimitType Property | UpperLimitType Property

© Palisade Corporation. All Rights Reserved.

RiskFitLimitType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 769: RISK Object Library - Palisade Corporation

Description

An enumeration which specified possible methods of fitting distribution to data.

Members

Member Description

RiskEstimatedParameters 'Fits' are performed using mathematical estimation techniques (for example, using the method of maximum likelihood

esitmation, or least-squares fitting, etc.)

RiskPredefinedDistributions 'Fits' are performed to a predefined set of distributions, which can then be compared to determine the best fitting option.

This is also sometimes called hypothesis comparison.

See Also

RiskConstants Object | FitMethod Property

© Palisade Corporation. All Rights Reserved.

RiskFitMethod Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 770: RISK Object Library - Palisade Corporation

Description

An enumeration of fitting statistics.

Members

Member Description

RiskChiSqStatistic The Chi-Square statistic. Often abbreviated Chi-Sq in @RISK.

RiskKolmogorovSmirnovStatistic The Kolmogorov-Smirnov statistic. Often abbreviated K-S in @RISK.

RiskAndersonDarlingStatistic The Anderson-Darling statistic. Often abbreviated A-D in @RISK.

RiskRMSErrorStatistic The Root-Mean Squared Error statistic. Often abbreviated RMSErr in @RISK.

RiskAIC Akaike Information Criterion.

RiskBIC Bayesian Information Criterion.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskFitStatistic Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 771: RISK Object Library - Palisade Corporation

Description

An enumeration of parameters that can be fixed for fitting operations.

Members

Member Description

RiskBinomialN Binomial distribution number of trials.

RiskBinomialP Binomial distribution probability.

RiskHypergeoN Hypergeometric distribution number of trials.

RiskNegBinS Negative binomial distribution number of successes.

RiskGammaShape Gamma distribution shape (alpha) parameter.

RiskNormalMean Normal distribution mean (mu) parameter.

RiskNormalStdDev Normal distribution standard deviation (sigma) parameter.

RiskWeibullShape Weibull distribution shape (alpha) parameter.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskFixedParameter Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 772: RISK Object Library - Palisade Corporation

Members

Member Description

RiskGanttInExcel

RiskGanttInProject

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskGanttLocation Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 773: RISK Object Library - Palisade Corporation

Description

An enumeration of goal seek comparison methods.

Members

Member Description

RiskComparePercentOfTargetValue Indicates a percentage of the target value is used.

RiskCompareDistanceFromTargetValue Indicated an absolute difference from the target value is used.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskGoalSeekComparisonMethod Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 774: RISK Object Library - Palisade Corporation

Members

Member Description

LegendWithoutStatistics

LegendWithStatistics

GridStatistics

GridData

LegendNotDisplayed

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskGraphLegendView Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 775: RISK Object Library - Palisade Corporation

Description

An enumerated list of possible operational states of the @RISK application.

Members

Member Description

RiskDisabledInterface For internal use only.

RiskStandardOperation The normal operational mode of @RISK.

RiskDefiningDistributions The Define Distribution window is being displayed.

RiskSimulating A simulation is in progress.

RiskBrowsingResults The Browse Results window is being displayed.

RiskApplicationInitializing The @RISK application is in the processing of starting.

RiskApplicationTerminating The @RISK application is in the processing of shutting down.

RiskFunctionsRemoved @RISK is in "swapped out" mode, where all @RISK functions have been removed.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskInterfaceMode Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 776: RISK Object Library - Palisade Corporation

Description

An enumerated list of the possible languages @RISK can be using.

Members

Member Description

RiskDefaultLanguage This constant is for internally use only.

RiskSimplifiedChineseLanguage

RiskGermanLanguage German

RiskEnglishLanguage English

RiskSpanishLanguage Spanish

RiskFrenchLanguage French

RiskItalianLanguage Italian

RiskJapaneseLanguage Japanese

RiskPortugueseLanguage Portuguese

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskLanguageID Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 777: RISK Object Library - Palisade Corporation

Description

An enumeration of the possible states of availability of the @RISK Library.

Members

Member Description

RiskLibraryNotAvailable The @RISK Library in unavailable.

RiskLibraryInitializationInProgress The @RISK Library is unavailable now, but should be available when it has finished its initialization.

RiskLibraryAvailable The @RISK Library is available.

See Also

RiskConstants Object | Availability Property

© Palisade Corporation. All Rights Reserved.

RiskLibraryAvailability Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 778: RISK Object Library - Palisade Corporation

Members

Member Description

RiskStandardOptimization

RiskConstraintSolverOptimization

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskOptimizationMode Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 779: RISK Object Library - Palisade Corporation

Description

An enumeration of optimization engines that can be used in RISKOptimizer.

Members

Member Description

RiskOptimizerEngineAutomatic The engine is automatically chosen as appropriate.

RiskOptimizerEngineGeneticAlgorithm A evolutionary GA engine.

RiskOptimizerEngineOptQuest The OptQuest engine.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskOptimizerEngine Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 780: RISK Object Library - Palisade Corporation

Description

An enumeration of time-span values used to control how long an optimization can run.

Members

Member Description

RiskOptimizerTimeSpanHours Hours

RiskOptimizerTimeSpanMinutes Minutes

RiskOptimizerTimeSpanSeconds Seconds

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskOptimizerTimeSpanUnit Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 781: RISK Object Library - Palisade Corporation

Description

An enumeration of @RISK product types.

Members

Member Description

RiskProductTypeTrial A trial version.

RiskProductTypeBeta A beta version.

RiskProductTypeBought A purchased license.

RiskProductTypeCourse A course license.

RiskProductTypeBook A book license.

RiskProductTypeStudent A student version.

See Also

RiskConstants Object | ProductType Property

© Palisade Corporation. All Rights Reserved.

RiskProductType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 782: RISK Object Library - Palisade Corporation

Members

Member Description

RiskProjectCalcManual

RiskProjectCalcAutomatic

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskProjectCalculationMode Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 783: RISK Object Library - Palisade Corporation

Members

Member Description

RiskProjectEntireSchedule

RiskProjectActivitiesAfterCurrentDate

RiskProjectActivitiesAfterLastStatusUpdate

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskProjectSimulationDateRange Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 784: RISK Object Library - Palisade Corporation

Description

An enumerated list of random number generators available for use in @RISK.

Members

Member Description

RiskMersenneTwisterThis is the default generator for @RISK. For more information on its characteristics, see the web page:

http://www.math.sci.hiroshima-u.ac.jp/~mmat/MT/emt.html.

RiskMRG32k3a This is a robust generator from Pierre L’Ecuyer. For more information on its characteristics, see

http://www.iro.umontreal.ca/~lecuyer/myftp/papers/streams00s.pdf.

RiskMWC The MWC generator concatenates two 16-bit multiply-with-carry generators, x(n)=36969x(n-1)+carry,

y(n)=18000y(n-1)+carry mod 2^16, has period about 2^60 and seems to pass all tests of randomness. A favorite

standalone generator---faster than KISS, which contains it.

RiskKISS The KISS generator, (Keep It Simple Stupid), is designed to combine the two multiply-with-carry generators in MWC with

the 3-shift register SHR3 and the congruential generator CONG, using addition and exclusive-or. Period about 2^123.

RiskLFIB4LFIB4 is defined as a lagged Fibonacci generator: x(n)=x(n-r) op x(n-s), with the x's in a finite set over which there is a

binary operation op, such as +,- on integers mod 2^32, * on odd such integers, exclusive-or(xor) on binary vectors.

RiskSWB SWB is a subtract-with-borrow generator developed to give a simple method for producing extremely long periods:

x(n)=x(n-222)-x(n-237)- borrow mod 2^32.

The 'borrow' is 0, or set to 1 if computing x(n-1) caused overflow in 32-bit integer arithmetic. This generator has avery

long period, 2^7098(2^480-1), about 2^7578. It seems topass all tests of randomness, except for the Birthday Spacings

test, which it fails badly, as do all lagged Fibonacci generators using +,- or xor.

RiskRandomNumberGenerator Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 785: RISK Object Library - Palisade Corporation

RiskKISS_SWB KISS+SWB has period >2^7700 and is highly recommended. Subtract-with-borrow (SWB) has the same local behaviour

as lagged Fibonacci using +,-,xor- -- the borrow merely provides a much longer period. SWB fails the birthday spacings

test, as do all lagged Fibonacci and other generators that merely combine two previous values by means of =,- or xor.

Those failures are for a particular case: m=512 birthdays in a year of n=2^24 days. There are choices of m and n for

which lags >1000 will also fail the test.

RiskRAN3I This is the random number generator used in @RISK 3.x and @Risk 4.x. It is from Numerical Recipes, and is based on

a portable “subtractive”random number generator of Knuth.

Remarks

(MWC, KISS, LFIB4, SWB, AND KISS+SWB) are all from George Marsaglia at Florida State University. See http://www.lns.cornell.edu/spr/1999-01/msg0014148.html for his comments.

See Also

RiskConstants Object | RandomNumberGenerator Property

© Palisade Corporation. All Rights Reserved.

Page 786: RISK Object Library - Palisade Corporation

Description

An enumeration of possible regression coefficient formats.

Members

Member Description

RiskRegressionEquationCoefficients Raw regression equation coefficients.

RiskRegressionStdBCoefficients The raw regression equation coefficients are 'standardized' by multiplying by the factor (Input Std. Deviation / Output Std.

Deviation).

RiskRegressionMappedValues The raw regression equation coefficients are multiplied by the Input Std. Deviation.

See Also

RiskConstants Object | CalculateRegressionSensitivities Method

© Palisade Corporation. All Rights Reserved.

RiskRegressionCoefficientFormat Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 787: RISK Object Library - Palisade Corporation

Description

An enumeration of possible destination workbooks for a report.

Members

Member Description

RiskActiveWorkbook Reports go in the currently active Excel workbook.

RiskNewWorkbook Reports go in a newly created Excel workbook.

See Also

RiskConstants Object | ReportPlacement Property

© Palisade Corporation. All Rights Reserved.

RiskReportPlacement Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 788: RISK Object Library - Palisade Corporation

Description

An enumeration of Excel reports.

Members

Member Description

RiskSimulationReportQuick A "Quick" Report, one page per output, with a summary of the most important information for each output.

RiskSimulationReportInputResultsSummary A summary report of all the simulated inputs. This matches the information in the Input tab of the @RISK Results

Summary window.

RiskSimulationReportOutputResultsSummary A summary report of all the simulated outputs. This matches the information in the Output tab of the @RISK Results

Summary window.

RiskSimulationReportDetailedStatistics A set of detailed statistical results for all inputs and outputs. This matches the information in the @RISK Detailed

Statistics window.

RiskSimulationReportData The complete set of simulation data for all inputs and outputs. This matches the information in the @RISK Data window.

RiskSimulationReportSensitivity The sensitivity results for all outputs. This matches the information in the @RISK Sensitivities window.

RiskSimulationReportScenarios The scenarios report for all outputs. This matches the information in the @RISK Scenarios window.

RiskSimulationReportTemplateSheets A static copy of all open template sheet. Template sheets must start with the prefix "RiskTemplate_".

RiskModelReportInputs A report summarizing all the currently defined inputs. This matches the information in the Inputs tab of the @RISK

Model window.

RiskModelReportOutputs A report summarizing all the currently defined outputs. This matches the information in the Outputs tab of the @RISK

Model window.

RiskModelReportCorrelations A report summarizing all the currently defined correlations. This matches the information in the Correlations tab of the

@RISK Model window.

See Also

RiskReportSelection Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 789: RISK Object Library - Palisade Corporation

RiskConstants Object | GenerateExcelReports Method | ReportSelected Property | ReportsToGenerate Property

© Palisade Corporation. All Rights Reserved.

Page 790: RISK Object Library - Palisade Corporation

Description

An enumeration of different graph types for use in the RiskResultsGraph function.

Members

Member Description

RiskResultsGraphHistogram

RiskResultsGraphCumulativeAscending

RiskResultsGraphCumulativeDescending

RiskResultsGraphRegressionTornado

RiskResultsGraphCorrelationTornado

RiskResultsGraphSummaryGraph

RiskResultsGraphBoxPlot

RiskResultsGraphTheoreticalDistribution

RiskResultsGraphHistogramWithTheoreticalOverlay

RiskResultsGraphHistogramWithAscendingOverlay

RiskResultsGraphHistogramWithDescendingOverlay

RiskResultsGraphMapValueTornado

RiskResultsGraphScatterPlot

RiskResultsGraphHistogramRelativeFrequency

See Also

RiskResultsGraphType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 791: RISK Object Library - Palisade Corporation

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

Page 792: RISK Object Library - Palisade Corporation

Description

An enumeration of possible choices where and how @RISK can stored simulation results.

Members

Member Description

RiskResultsPromptOnSave Each time a workbook is saved, @RISK will prompt the user for where @RISK results should be stored. This is the

default option.

RiskResultsSaveInWorkbook @RISK automatically will save simulation results into workbooks.

RiskResultsNeverSave @RISK will never save simulation results, unless the save @RISK results command is manually run.

RiskResultsSaveToExternalFile

See Also

RiskConstants Object | SaveLocation Property

© Palisade Corporation. All Rights Reserved.

RiskResultsStorageLocation Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 793: RISK Object Library - Palisade Corporation

Description

An enumeration of sampling types that can be used during a simulation.

Members

Member Description

RiskMonteCarlo Unstratified sampling.

RiskLatinHypercube Stratified sampling. This is the @RISK default.

See Also

RiskConstants Object | SamplingType Property

© Palisade Corporation. All Rights Reserved.

RiskSamplingType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 794: RISK Object Library - Palisade Corporation

Description

An enumerated list of named scaling factors.

Members

Member Description

RiskNoScaling Values are unscaled.

RiskScaleByThousands Values are scaled in thousands.

RiskScaleByThousandths Values are scaled in thousandths.

RiskScaleByMillions Values are scaled in millions.

RiskScaleByMillionths Values are scaled in millionths.

RiskScaleByBillions Values are scaled in billions.

RiskScaleByBillionths Values are scaled in billionths.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskScalingFactor Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 795: RISK Object Library - Palisade Corporation

Description

An enumeration of possible sensitivity analysis input types.

Members

Member Description

RiskSensAnalysisCellBasedInput The entire cell (or cells) will be changed during the sensitivity analysis.

RiskSensAnalysisDistributionBasedInput Only the @RISK distribution function in the specified cell (or cells) will be changed during the sensitivity analysis

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskSensAnalysisInputType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 796: RISK Object Library - Palisade Corporation

Description

An enumerated list of possible results from a simulation.

Members

Member Description

RiskSimulationCanceledNoResults The simulation was canceled by the user and no results are available for display.

RiskSimulationCanceledPartialResults The simulation was canceled by the user, but there are results that can be displayed.

RiskSimulationCompletedSuccessfully The simulation completed normally.

RiskSimulationErrorOccurred An error occurred in the simulation, likely due to a problem in the model (e.g. a badly formed correlation matrix, etc.)

See Also

RiskConstants Object | Start Method

© Palisade Corporation. All Rights Reserved.

RiskSimulationCompletionStatus Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 797: RISK Object Library - Palisade Corporation

Description

An enumerated list of ways @RISK distribution functions will return values when a simulation is not in progress.

Members

Member Description

RiskStaticValues A static (non-random) value is returned.

RiskRandomValues A random value is returned. Each recalc will generate a new different random value.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskStandardRecalcBehavior Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 798: RISK Object Library - Palisade Corporation

Description

An enumeration of possible static values to be used when an RiskStaticValue is not specified for a function.

Members

Member Description

RiskCorrectedExpectedValue The expected value of the distribution is used, except that in the case of a discrete distribution, the results is modified to

match one of the possible results. (This latter adjustment is useful to prevent non-simulation calculation errors in the

spreadsheet.)

RiskTrueExpectedValue The true (non-rounded) expected value.

RiskModeValue The mode.

RiskPercentileValue A percentile (specified in another property).

See Also

RiskConstants Object | SimSettingsStdRecalcWithoutRiskStatic Property | StdRecalcWithoutRiskStatic Property

© Palisade Corporation. All Rights Reserved.

RiskStaticValueType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 799: RISK Object Library - Palisade Corporation

Description

An enumeration of possible updating mode for statistic functions.

Members

Member Description

RiskUpdateEachIteration The statistic functions are updated after each interation of a simulation

RiskUpdateEachSimulation The statistic functions are update only at the end of a simulation.

See Also

RiskConstants Object | SimSettingsStatisticFunctionUpdating Property | StatisticFunctionUpdating Property

© Palisade Corporation. All Rights Reserved.

RiskStatisticFunctionUpdating Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 800: RISK Object Library - Palisade Corporation

Description

An enumeration of statistic types.

Members

Member Description

RiskStatisticMinimum The minimum.

RiskStatisticMaximum The maximum.

RiskStatisticMean The mean.

RiskStatisticMode The mode.

RiskStatisticMedian The median (50th percentile)

RiskStatisticSkewness The skewness.

RiskStatisticKurtosis The kurtosis.

RiskStatisticStdDeviation The standard deviation.

RiskStatisticVariance The variance.

RiskStatisticPercentile A percentile.

RiskStatisticRange

See Also

RiskConstants Object

RiskStatisticType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 801: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 802: RISK Object Library - Palisade Corporation

Description

An enumeration of stress methods for an input.

Members

Member Description

RiskStressPercentileRange The input is stressed across a range of percentiles.

RiskStressSubstituteFunction The input is stressed by replacing its distribution function with another formula.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskStressMethod Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 803: RISK Object Library - Palisade Corporation

Description

An enumerated list of different summary graph center line statistics.

Members

Member Description

RiskSummaryGraphCenterlineStatisticMean The mean of the data.

RiskSummaryGraphCenterlineStatisticMedian The median of the data (50th Percentile).

RiskSummaryGraphCenterlineStatisticMode The mode of the data.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskSummaryGraphCenterlineStatistic Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 804: RISK Object Library - Palisade Corporation

Description

An enumerated list of possible summary graph ranges.

Members

Member Description

RiskSummaryGraphRangeP25P75 25th Percentile to 75th Percentile

RiskSummaryGraphRangeP10P90 10th Percentile to 90th Percentile

RiskSummaryGraphRangeP5P95 5th Percentile to 95th Percentile

RiskSummaryGraphRangeP1P99 1st Percentile to 99th Percentile

RiskSummaryGraphRangeMinMax Full Data Range.

RiskSummaryGraphRangeSD1 Plus or Minus 1 Standard Deviation

RiskSummaryGraphRangeSD2 Plus or Minus 2 Standard Deviations

RiskSummaryGraphRangeSD3 Plus or Minus 3 Standard Deviations

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskSummaryGraphRange Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 805: RISK Object Library - Palisade Corporation

Description

An enumeration of possible ways the change preview dialog will be displayed when the @RISK user swaps in functions.

Members

Member Description

RiskPreviewAll The preview dialog will always be displayed, showing all formula changes.

RiskPreviewModifiedFormulasAndStaticValues Only formulas and/or static values that were modified after the swap out occured will be shown in the change preview

dialog.

RiskPreviewModifiedFormulas Only formulas that were modified after the swap out occured will be shown in the change preview dialog.

RiskPreviewNone The change preview dialog will never be shown.

See Also

RiskConstants Object | SwapPreviewChanges Property

© Palisade Corporation. All Rights Reserved.

RiskSwapPreviewChanges Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 806: RISK Object Library - Palisade Corporation

Description

An enumeration of possible text orientations.

Members

Member Description

RiskHorizontalText

RiskVerticalText

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskTextOrientation Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 807: RISK Object Library - Palisade Corporation

Members

Member Description

RiskTimeSeriesVertical

RiskTimeSeriesHorizontal

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskTimeSeriesOrientation Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 808: RISK Object Library - Palisade Corporation

Members

Member Description

RiskTimeSeriesPeriodReturn

RiskTimeSeriesCumulativeReturn

RiskTimeSeriesValue

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskTimeSeriesOutputType Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 809: RISK Object Library - Palisade Corporation

Description

An enumeration of tornado graph display formats.

Members

Member Description

RiskTornadoRegressionCoefficients A tornado of regression coefficients.

RiskTornadoRegressionMappedValues A tornado of regression coefficients mapped onto output units.

RiskTornadoCorrelationCoefficients A tornado of correlation coefficients.

RiskTornadoChangeInOutputStatistic

See Also

RiskConstants Object | GraphPreferredTornadoFormat Property

© Palisade Corporation. All Rights Reserved.

RiskTornadoDisplayFormat Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 810: RISK Object Library - Palisade Corporation

Description

An enumeration of values controling how the @RISK Windows List will be displayed.

Members

Member Description

RiskWindowListNever The windows list will never be displayed.

RiskWindowListAutomatic The windows list will be displayed automatically when more than 5 @RISK windows are displayed simultaneously.

RiskWindowListAlways The windows list is always displayed.

See Also

RiskConstants Object | WindowListDisplay Property

© Palisade Corporation. All Rights Reserved.

RiskWindowListDisplay Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 811: RISK Object Library - Palisade Corporation

Description

An enumeration of default window sizes.

Members

Member Description

RiskWindowSizeSmall Small windows.

RiskWindowSizeMedium Medium sized windows.

RiskWindowSizeLarge Large windows.

See Also

RiskConstants Object | WindowDefaultSize Property

© Palisade Corporation. All Rights Reserved.

RiskWindowSize Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 812: RISK Object Library - Palisade Corporation

UDT Members

Member Type Description

BinMinimum Double The minimum (left) value of the bin.

BinMaximum Double The maximum (right) value of the bin.

FitOccupation Double The number of samples that would theoretically fall into the bin

based on the fitted distribution. This value may not be an integer

value.

InputOccupation Double |

The number of input sample that fall into the bin.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskChiSqBinInformation UDT

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 813: RISK Object Library - Palisade Corporation

UDT Members

Member Type Description

Enabled Boolean TRUE indicates this fit will actually be used when performing the

fitting process. FALSE indicates this fit will be bypassed.

Name String The name to associate with this fit.

DistributionFunction String |

The @RISK distribution function for this fit.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskPredefinedFit UDT

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 814: RISK Object Library - Palisade Corporation

UDT Members

Member Type Description

InputIndex Long The index of the input in the collection of simulation results. This

can be used to obtain more information about the input.

Significance Double The difference between the median and the subset median, divided

by the standard deviation.

SubsetMedian Double The median value of the subset of data that meets the criteria of the

scenario.

SubsetPercentile Double |

The percentile (with respect to all the data for the output) of the the

subset median.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskScenarioData UDT

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 815: RISK Object Library - Palisade Corporation

UDT Members

Member Type Description

InputIndex Long The index of the input in the collection of simulation results. This

can be used to obtain more information about the input.

Coefficient Double |

The sensitivity coefficient connecting the output to the input. This

coefficient takes on different forms depending on the specific

sensitivity calculation performed.

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskSensitivityData UDT

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 816: RISK Object Library - Palisade Corporation

UDT Members

Member Type Description

InputIndex Long

MinimumValue Double

MaximumValue Double

See Also

RiskConstants Object

© Palisade Corporation. All Rights Reserved.

RiskStatisticSensitivityData UDT

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 817: RISK Object Library - Palisade Corporation

Description

Controls the preferred display format for tornado graphs.

Property type

Read-write property

Syntax (Visual Basic)

Public Property GraphPreferredTornadoFormat() As RiskTornadoDisplayFormat

Remarks

This property only applies to tornado graphs.

This property applies to new graphs when they are first created. To apply this property to existing graphs call the ApplyNow method.

See Also

RiskApplicationSettings Object | GraphPreferredDistributionFormat Property | RiskTornadoDisplayFormat Enumeration

© Palisade Corporation. All Rights Reserved.

GraphPreferredTornadoFormat Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 818: RISK Object Library - Palisade Corporation

Description

Indicates what statistic determines the "best fit" for batch fits.

Property type

Read-write property

Syntax (Visual Basic)

Public Property BatchFitSelectorStatistic() As RiskFitStatistic

See Also

RiskFitDefinition Object | BatchFit Property | BatchFitReportIncludeCorrelations Property | BatchFitReportIncludeDetailWorksheets Property | BatchFitReportInNewWorkbook Property

| BatchFitReportStyle Property

© Palisade Corporation. All Rights Reserved.

BatchFitSelectorStatistic Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 819: RISK Object Library - Palisade Corporation

Description

Provides an object for the control of the @RISK Library.

For a list of all members defined in this module, see RiskLibraryServer members.

See Also

RiskLibraryServer Members

© Palisade Corporation. All Rights Reserved.

RiskLibraryServer Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 820: RISK Object Library - Palisade Corporation

Public Methods

AddResultsToLibrary Adds the current @RISK simulation results to the @RISK Library.

ShowLibraryWindow Displays the @RISK Library window (if available) to the user.

Public Properties

Availability Indicates whether the @RISK Library is available.

See Also

RiskLibraryServer Overview

© Palisade Corporation. All Rights Reserved.

RiskLibraryServer Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 821: RISK Object Library - Palisade Corporation

Description

Adds the current @RISK simulation results to the @RISK Library.

Syntax

Public Sub AddResultsToLibrary()

Example

[[New Example] (Visual Basic)]

Public Sub AddResultsToAtRiskLibrary()

If Risk.Library.Availability = RiskLibraryAvailable Then

Risk.Library.AddResultsToLibrary

Else

MsgBox "The @RISK Library is not available."

End If

End Sub

See Also

RiskLibraryServer Object

© Palisade Corporation. All Rights Reserved.

AddResultsToLibrary Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 822: RISK Object Library - Palisade Corporation

Description

Indicates whether the @RISK Library is available.

Property type

Read-only property

Syntax (Visual Basic)

Public Property Availability() As RiskLibraryAvailability

Remarks

The @RISK Library feature is not available in the Standard Edition of @RISK.

The user may turn off the @RISK Library feature manually with the LibraryEnabled property of the Risk.ApplicationSettings object.

Since the set up of the librarys' databases may take some time, the @RISK Library loads asynchronously. If the value of this property is RiskLibraryInitializationInProgress, that indicates

that the Library is still in the process of starting up.

Example

[[New Example] (Visual Basic)]

'Show the @RISK Library window if it is available.

Public Sub ShowAtRiskLibraryIfAvailable()

If Risk.Library.Availability = RiskLibraryAvailable Then

Risk.Library.ShowLibraryWindow

Else

MsgBox "The @RISK Library is not available."

End If

End Sub

See Also

RiskLibraryServer Object | LibraryEnabled Property

Availability Property

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 823: RISK Object Library - Palisade Corporation

© Palisade Corporation. All Rights Reserved.

Page 824: RISK Object Library - Palisade Corporation

Description

Displays the @RISK Library window (if available) to the user.

Syntax

Public Sub ShowLibraryWindow()

Example

[[New Example] (Visual Basic)]

'Show the @RISK Library window if it is available.

Public Sub ShowAtRiskLibraryIfAvailable()

If Risk.Library.Availability = RiskLibraryAvailable Then

Risk.Library.ShowLibraryWindow

Else

MsgBox "The @RISK Library is not available."

End If

End Sub

See Also

RiskLibraryServer Object | Availability Property

© Palisade Corporation. All Rights Reserved.

ShowLibraryWindow Method

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 825: RISK Object Library - Palisade Corporation

Description

An enumeration of fitting statistics.

Members

Member Description

RiskChiSqStatistic The Chi-Square statistic. Often abbreviated Chi-Sq in @RISK.

RiskKolmogorovSmirnovStatistic The Kolmogorov-Smirnov statistic. Often abbreviated K-S in @RISK.

RiskAndersonDarlingStatistic The Anderson-Darling statistic. Often abbreviated A-D in @RISK.

RiskRMSErrorStatistic The Root-Mean Squared Error statistic. Often abbreviated RMSErr in @RISK.

RiskAIC Akaike Information Criterion.

RiskBIC Bayesian Information Criterion.

See Also

RiskOL Object

© Palisade Corporation. All Rights Reserved.

RiskFitStatistic Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 826: RISK Object Library - Palisade Corporation

Description

Contains utility enumeration, structures, and constant values.

For a list of all members defined in this module, see RiskOL members.

See Also

RiskOL Members

© Palisade Corporation. All Rights Reserved.

RiskOL Object

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 827: RISK Object Library - Palisade Corporation

See Also

RiskOL Overview

© Palisade Corporation. All Rights Reserved.

RiskOL Object Members

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 828: RISK Object Library - Palisade Corporation

Description

An enumeration of the possible states of availability of the @RISK Library.

Members

Member Description

RiskLibraryNotAvailable The @RISK Library in unavailable.

RiskLibraryInitializationInProgress The @RISK Library is unavailable now, but should be available when it has finished its initialization.

RiskLibraryAvailable The @RISK Library is available.

See Also

RiskOL Object | Availability Property

© Palisade Corporation. All Rights Reserved.

RiskLibraryAvailability Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.

Page 829: RISK Object Library - Palisade Corporation

Description

An enumeration of tornado graph display formats.

Members

Member Description

RiskTornadoRegressionCoefficients A tornado of regression coefficients.

RiskTornadoRegressionMappedValues A tornado of regression coefficients mapped onto output units.

RiskTornadoCorrelationCoefficients A tornado of correlation coefficients.

RiskTornadoChangeInOutputStatistic

See Also

RiskOL Object | GraphPreferredTornadoFormat Property

© Palisade Corporation. All Rights Reserved.

RiskTornadoDisplayFormat Enumeration

Palisade @RISK 6.0 for Excel Object Library Send comments on this topic.