CB.GetScenarioAnalysisOption

This function returns specified settings made by CB.ScenarioAnalysisND or the Scenario Analysis tool.

Table 129. CB.GetScenarioAnalysisOption Returned Data Type

Returned Value

Returned Data Type

The specified Scenario Analysis settings

Variant

Table 130. CB.GetScenarioAnalysisOption Parameters

Parameter

Required?

VBA Data Type

Table

Index

Required

Integer

Table 131, CB.GetScenarioAnalysisOption Index Parameter — Required, Integer

Value1

Optional

Double

Table 132, CB.GetScenarioAnalysisOption Value1 Parameter — Optional, Variant

The Index parameters (Table 131, CB.GetScenarioAnalysisOption Index Parameter — Required, Integer) are the same as those used to make the Scenario Analysis settings.

Table 131. CB.GetScenarioAnalysisOption Index Parameter — Required, Integer

Named Constant Value

VBA Data Type

Index Value

Description

cbSceChooseTarget

Integer

1

Returns the target forecast cell to be analyzed

cbSceRangeForecastResults

Integer

2

Returns whether percentiles or forecast values are to be used for the analysis:

cbSceSelectPercentiles [3]

cbSceSelectForeValues [4]

cbSceSelectPercentiles

Integer

3

Works with Value1 to return the minimum or maximum of the range of percentiles used for analysis if percentiles were used

cbSceSelectForeValues

Integer

4

Works with Value1 to return the minimum or maximum of the range of forecast values used for analysis if forecast values were used

cbSceForeOption

Integer

5

Returns the current Scenario Analysis Options setting that indicates which forecast charts to show while running Scenario Analysis: cbSceShowDefinedFore [1], cbSceShowTargetFore [2], or cbSceHideFore [3] (Table 161, CB.ScenarioAnalysisND Value1 Parameter — Optional, Variant)

cbSceSimTrials

Integer

6

Returns the number of trials to run

cbSceIncludeNonTargetFore

Integer

7

When True is returned, indicates that all forecasts are included in the output table; if False, only the target forecast is included

Table 132. CB.GetScenarioAnalysisOption Value1 Parameter — Optional, Variant

Related Value

Named Constant Value

VBA Data Type

Index Value

Description

For Index = 3, cbSceSelectPercentiles

cbSceMinValue

Double

1

If percentiles are used, returns the minimum value of the percentile range to work on

For Index = 3, cbSceSelectPercentiles

cbSceMaxValue

Double

2

If percentiles are used, returns the maximum value of the percentile range to work on

For Index = 4, cbSceSelectForeValues

cbSceMinValue

Double

1

If forecast values are used, returns the minimum value of the value range to work on

For Index = 4, cbSceSelectForeValues

cbSceMaxValue

Double

2

If forecast values are used, returns the maximum value of the value range to work on