The function sets preferences for the selected sensitivity chart without using a dialog. If more than one sensitivity chart is open and no chart is selected, this call returns a cbErrNoSelection error for CB.MacroResult.
Table 164. Parameters for CB.SensPrefsND
Parameter | VBA Data Type | Value | Description |
---|
Index | Integer | See Table 165 | Works with optional parameters Value1 and Value2 to set sensitivity chart preferences |
Value1 (Optional) | Variant | See Table 166 | Works with the Index parameter to set sensitivity chart preferences |
Value2 (Optional) | Variant | See Table 167 | Works with Index = 5 or 6 to set the maximum or minimum number of sensitivity values |
Table 165, following, lists named constant and index values for the Index parameter.
Table 165. CB.SensPrefsND Index Parameter Values — Required, Integer
Named Constant Value | Index Value | Description |
---|
cbSenTargetFore | 1 | Defines the selected forecast cell as the target forecast |
cbSenMeasure | 2 | Sets whether to measure sensitivity by rank correlation or by contribution to variance, according to Value1 |
cbSenDisplayOnlyHighest | 5 | Sets to display only the highest sensitivities, according to Value1 and Value2 |
cbSenDisplayGreaterThan | 6 | Sets to display only sensitivities greater than Value2, according to Value1 |
cbSenTitle | 7 | Gives the sensitivity chart a title according to Value1 |
cbSenChooseAssum | 8 | Clears and selects the assumptions for the sensitivity chart, according to Value1 |
Note: | Index values cbSenIncludeAssum [3] and cbSenIncludeOtherFore [4] are obsolete. |
Table 166, following, lists values for the optional Value1 parameter.
Table 166. CB.SensPrefsND Value1 Parameter Values — Optional, Variant
Used With Specified Values of Index | Named Constant or Boolean Value | Index Value | Description |
---|
For Index = 2: Boolean | True or False OR cbMesRankCorrelation or cbMesContributionToVar | n/a | True measures sensitivity by rank correlation. False uses contribution to variance. |
For Index = 5: Boolean | True or False | n/a | True displays only a certain number (Value2) of sensitivities. False does not. |
For Index = 6: Boolean | True or False | n/a | True only displays sensitivities greater than Value2 |
For Index = 7: String | Title in quotes ("") | n/a | Defines the sensitivity chart title |
For Index = 8: Integer | cbChaAll | 1 | Includes all assumptions |
For Index = 8: Integer | cbChaAdd | 3 | Adds the assumption in the selected cell to the list of chosen assumption |
For Index = 8: Integer | cbChaClearList | 4 | Clears the list of chosen assumptions |
For Index = 8: Integer | cbChaRemove | 6 | Removes the assumption in the selected cell from the list of chosen assumptions |
Table 167, following, lists values for the optional Value2 parameter.
Table 167. CB.SensPrefsND Value2 Parameter Values — Optional, Variant
Used With Specified Values of Index | Value | Description |
---|
For Index = 5: Integer | A positive, whole number | Sets the maximum number of sensitivities to display |
For Index = 6: Double | A positive number between 0.00 and 1.00 | Sets the minimum sensitivity values to display |