This subroutine sets the certainty range for one or all forecasts.
Note: | Run a simulation before calling this subroutine; otherwise CB.MacroResult returns cbErrNotReady. To apply the subroutine to only one cell, select that cell. |
Table 184. CB.SetRange Parameters
Parameter | VBA Data Type | Value | Description |
---|
Min (Optional) | Variant | Any number or cbMinusInfinity | Specifies the value of the low end of the certainty range and locks the certainty grabber there (if greater than –Infinity). If only Min is set, Max is set to +Infinity and the grabber is unlocked. If both Min and Max are set, both grabbers are locked. |
Max (Optional) | Variant | Any number or cbPlusInfinity | Specifies the value of the high end of the certainty range and locks the certainty grabber there (if less than +Infinity). If only Max is set, Min is set to –Infinity and unlocked. If both Min and Max are set, both grabbers are locked. |
Certainty (Optional) | Variant | Any number between 0 and 100 | Specifies the certainty level (as a percentage) to display. If Certainty and Min are both set, Max is set to the appropriate value but is not locked. If Certainty and Max are both set, Min is set to the appropriate value but is not locked. |
All (Optional) | Variant | True or False | Specifies whether to apply this subroutine to all forecasts (True) or just the selected forecast cell (False). The default is False. If this parameter is set to False and the selected cell contains no forecast, CB.MacroResult returns cbErrNoForecastInCell. |
You can specify one or two of Min, Max, and Certainty. If you specify all three, Crystal Ball uses Min and Max to determine the certainty and ignores the entered Certainty value. If Min or Max is set to a value other than –Infinity or +Infinity, the certainty grabber is locked at the indicated value. If either Min or Max is set to –Infinity or +Infinity, the certainty grabber is not locked there.