This subroutine sets attributes of Crystal Ball cells without the Cell Preferences dialog. The default for any preference is the previous setting in the Cell Preferences dialog.
CB.CellPrefsND cannot run if a cell with Crystal Ball data is located in a write-protected worksheet. |
Table 19. CB.CellPrefsND Parameters
Changes assumption, forecast, or decision variable cells depending on the selected constant or index value: | ||
Sets preferences depending on the Value parameter that follows it. For constant and index values, see Table 20 | ||
Works with Index2 to specify preference settings, as described in Table 21 | ||
True applies changes only to new Crystal Ball cells. False applies changes to existing and new Crystal Ball cells. The default is False. | ||
Specifies whether changes are applied globally to all open and new workbooks, to cells of that type in the active workbook, or to cells of that type in the active worksheet, depending on the selected constant or index value: |
The Index2 parameter listed in the following table (Table 20) works with the Value parameter to set cell preferences. For Value parameter values, see Table 21.
Table 20. CB.CellPrefsND Index2 Parameter Values — Integer, Required
Sets a pattern choice defined by Value (Table 21) | ||
Sets the value in assumption cells to be the mean of the defined distribution | ||
Sets the value in decision variable cells to be the midpoint of the defined range | ||
Sets the value in assumption cells to be the median of the defined distribution | ||
Sets the value in decision variable cells to be the minimum of the defined range | ||
Sets the value in decision variable cells to be the maximum of the defined range |
The Value parameter values listed in the following table work with the Index2 parameter values to set cell preferences. For Index2 values, see Table 20.
Table 21. CB.CellPrefsND Value Parameter Values — Variant, Required