CB.DecisionTableND

The Decision Table tool runs multiple simulations to test different values for one or two decision variables. This call runs the Decision Table tool and displays results without using a dialog.

Note:

Before calling CB.DecisionTableND, reset the Crystal Ball simulation.

Table 45. CB.DecisionTableND Parameters

Parameter

Required?

VBA Data Type

Table

Index

Required

Integer

Table 46

Index2

Optional

Integer

Table 47

Value

Optional

Variant

Table 48

Table 46. CB.DecisionTableND Index Parameter – Required, Integer

Named Constant Value

Index Value

Description

cbDecChooseTarget

1

Sets the target forecast for the decision table (operates on the forecast in the currently selected cell)

cbDecChooseDecVar

2

Used with Index2 to select one or two decision variables for the decision table (operates on the decision variable in the currently selected cell)

cbDecSimOption

3

Used with Index2 to set simulation options for the decision table

cbDecForeOption

4

Used with Index2 to set forecast display options

cbDecRun

5

Runs the Decision Table tool when all settings have been specified

Table 47. CB.DecisionTableND Index2 Parameter – Optional, Integer

Related Value

Named Constant Value

Index Value

Description

For Index = 2, cbDec ChooseDecVar: Integer

cbChdAdd

3

Used with cbDecChooseDecVar to add the decision variable in the selected cell to the list of chosen decision variables

For Index = 2, cbDec ChooseDecVar: Integer

cbChdClearList

4

Used with cbDecChooseDecVar to clear the list of chosen decision variables

For Index = 3, cbDecSimOption: Integer

cbDecNumValuesVar1

1

Used with cbDecSimOption to specify the number of test values to use for the first selected decision variable

For Index = 3, cbDecSimOption: Integer

cbDecNumValuesVar2

2

Used with cbDecSimOption to specify the number of test values to use for the second selected decision variable

For Index = 3, cbDecSimOption: Integer

cbDecSimTrials

3

Used with cbDecSimOption to specify the maximum number of trials for each simulation

For Index = 4, cbDecForeOption: Integer

cbDecShowDefinedFore

1

Used following cbDecForeOption; the equivalent of the Show Forecasts As Defined dialog setting

For Index = 4, cbDecForeOption: Integer

cbDecShowTargetFore

2

Used following cbDecForeOption; the equivalent of the Show Only Target Forecast dialog setting

For Index = 4, cbDecForeOption: Integer

cbDecHideFore

3

Used following cbDecForeOption; the equivalent of the Hide All Forecasts dialog setting

Table 48. CB.DecisionTableND Value Parameter – Optional, Variant

Related Value

Named Constant Value

VBA Data Type

Description

For Index2 = cbDecNumValuesVar1 or cbDecNumValuesVar2: Integer

A positive whole number

Integer

Specifies the number of test values to use for each selected decision variable

For Index2 = cbDecSim Trials: Long Integer

A positive whole number

Long integer

Specifies the maximum number of trials for each simulation