Alphabetic List of Crystal Ball Macro Calls

Note:

Full descriptions are listed alphabetically in Crystal Ball Macro Calls in the indicated sections.

Table 1. Alphabetic List of Crystal Ball Macro Calls

Name

Description

CB.AboutBox

Displays information about Crystal Ball

CB.AlertOnArgumentError

Displays a message when an argument error occurs

CB.AlertOnMacroResultError

Displays a message when an execution error occurs

CB.AlertOnObsolete

Displays a message when an obsolete call or constant is used

CB.AssumPrefsND

Sets attributes of Crystal Ball assumptions

CB.AutoDownshift

In Crystal Ball Decision Optimizer, determines whether to automatically downshift to Normal speed or fail when a model is incompatible with Extreme speed

CB.BatchFit

Launches the Batch Fit tool

CB.BatchFitND

Runs the Batch Fit tool without displaying dialogs

CB.Bootstrap

Launches the Bootstrap tool

CB.BootstrapND

Runs the Bootstrap tool without displaying dialogs

CB.CBLoaded

Indicates whether Crystal Ball is currently loaded within Microsoft Excel

CB.CellPrefs

Sets attributes of Crystal Ball cells using a dialog

CB.CellPrefsND

Sets attributes of Crystal Ball cells without using a dialog

CB.ChartPrefs

Sets chart preferences for the selected forecast using a dialog

CB.ChartPrefsND

Sets chart preferences for selected forecast without a dialog

CB.CheckData

Checks Crystal Ball data cells for validity, initializes variables with dialogs in case of error

CB.CheckDataND

Checks Crystal Ball data cells for validity, initializes variables without error prompting

CB.ClearData

Erases assumptions, decision variables, and forecasts from selected cells after prompting

CB.ClearDataND

Erases assumptions, decision variables, and forecasts from selected cells without prompting

CB.CloseAllCharts

Closes all open chart windows; equivalent to Analyze, then Close All

CB.CloseChart

Closes the selected chart of the given type

CB.CloseFore

Closes the forecast chart

CB.CloseSensitiv

Closes the selected sensitivity chart

CB.CloseTrend

Closes the selected trend chart

CB.CopyData

Copies Crystal Ball data in the specified range

CB.CopyDataND

Copies selected assumptions, decision variables, or forecasts

CB.CopyScatter

Copies the selected scatter chart to the clipboard

CB.CopySensitiv

Copies the selected sensitivity chart to the clipboard

CB.CopyTrend

Copies the selected trend chart to the clipboard

CB.CorrelateND

Defines a correlation coefficient between two selected assumptions

CB.CreateChart

Creates a new chart of the specified type with the optional name, if specified

CB.CreateRpt

Creates a report from the current simulation and restored results, optimization (with an appropriate license), or time-series forecast using a dialog

CB.CreateRptND

Sets report preferences and creates a report from the current simulation and restored results, optimization (with an appropriate license), or time-series forecast without a dialog

CB.DataAnalysis

Launches the Data Analysis tool

CB.DataAnalysisND

Runs the Data Analysis tool without displaying dialogs

CB.DecisionTable

Launches the Decision Table tool

CB.DecisionTableND

Runs the Decision Table tool without displaying dialogs

CB.DefineAltParms

Creates or changes an alternate parameter set

CB.DefineAssum

Defines or changes assumptions in selected cells with a dialog

CB.DefineAssumND

Defines or changes assumptions in selected cells without a dialog

CB.DefineAssumFromForeND

Defines an assumption from a specified forecast without using a dialog

CB.DefineDecVar

Defines or changes a decision variable in a selected cell using a dialog

CB.DefineDecVarND

Defines or changes a decision variable in a selected cell without a dialog

CB.DefineFore

Defines a forecast in a selected cell using a dialog

CB.DefineForeND

Defines a forecast in a selected cell without a dialog

CB.DeleteChart

Deletes a chart of the specified type and chart ID

CB.EnumAssum

Enumerates assumption cells for all open workbooks

CB.EnumChart

Returns the unique name of the next chart of the specified type

CB.EnumCorrelation

Enumerates correlated assumptions and correlation values for all open workbooks

CB.EnumDecVar

Enumerates decision variable cells for all open workbooks

CB.EnumFore

Enumerates forecast cells for all open workbooks

CB.ExtractData

Extracts data from the current simulation and restored results, optimization (with an appropriate license), or time-series forecast using a dialog

CB.ExtractDataND

Extracts data from the current simulation and restored results, optimization (with an appropriate license), or time-series forecast without a dialog

CB.Fit

Fits a specific probability distribution to a range of data and returns information about the fit

CB.FormatPrefs

Opens the Chart Preferences dialog to set format preferences for the selected forecast

CB.FormatPrefsND

Sets format preferences for the selected forecast without a dialog

CB.Freeze

Defines which Crystal Ball data cells to hold to their spreadsheet values during a simulation using a dialog

CB.FreezeND

Defines which Crystal Ball data cells to hold to their spreadsheet values during a simulation without a dialog

CB.GetAssum

Retrieves information for a specific assumption cell

CB.GetAssumPercent

Calculates the value of the specified assumption that corresponds to the specified percentile

CB.GetBatchFitOption

Returns current settings for the Batch Fit tool

CB.GetBootstrapOption

Returns current settings for the Bootstrap tool

CB.GetCBAutoLoad

Returns the current Crystal Ball autoload setting that indicates whether Crystal Ball is set to open whenever Microsoft Excel opens

CB.GetCertainty

Calculates the certainty level (or probability) of achieving a forecast value at or smaller than a specific threshold

CB.GetCorrelation

Returns the correlation between two assumption cells

CB.GetDataAnalysisOption

Returns current settings for the Data Analysis tool

CB.GetDecisionTableOption

Returns current settings for the Decision Table tool

CB.GetDecVar

Retrieves information for a specific decision variable cell

CB.GetExcel2007ForegroundMode

Returns the current Run Preferences foreground mode setting for Microsoft Excel 2007 in Normal speed

CB.GetFitParm

Returns the value of the specified distribution parameter for the last CB.Fit call

CB.GetFore

Retrieves information for a specific forecast cell

CB.GetForeData

Returns specified forecast data for a given trial

CB.GetForePercent

Returns the value corresponding to a percentile for a specific forecast

CB.GetForeStat

Returns statistics for a specific forecast cell

CB.GetLockFitParm

Returns whether a distribution and, optionally, specific parameters have locked values for fitting purposes

CB.GetRunPrefs

Returns a Run Preferences setting

CB.GetScenarioAnalysisOption

Returns current settings for the Scenario Analysis tool

CB.GetTwoDSimulationOption

Returns current settings for the 2D Simulation tool

CB.GetVersion

Returns the current Crystal Ball version as a full build number or version ID number

CB.GetWorksheetVersion

Returns the Crystal Ball data version of the active or specified worksheet

CB.IsCBObject

Tests if a worksheet or workbook contains Crystal Ball data

CB.Iterations

Returns the number of trials run in a simulation

CB.LockFitParm

Sets parameter locking for distributions and, optionally, specific parameters

CB.MacroResult

Tells you if a Crystal Ball macro call worked correctly

CB.MacroResultDetail

Similar to CB.MacroResult with additional error information

CB.OpenChart

Opens the selected chart of the specified type

CB.OpenFore

Opens a forecast window for the selected cell

CB.OpenSelection

Opens all charts defined for cells in the selected range

CB.OpenSensitiv

Opens the selected sensitivity chart

CB.OpenTrend

Opens the selected trend chart

CB.PasteData

Pastes assumptions, decision variables, or forecasts into selected cells

CB.Reset

Resets the current simulation after prompting

CB.ResetND

Resets the current simulation without confirmation

CB.RestoreResults

Restores simulation results from a file using a dialog

CB.RestoreResultsND

Restores simulation results from a file without a dialog

CB.RunPrefs

Sets Crystal Ball run preferences using a dialog

CB.RunPrefsND

Sets Crystal Ball run preferences without a dialog

CB.RuntimeMode

Hides the Crystal Ball toolbar and menus

CB.SaveResults

Saves current simulation results using a dialog

CB.SaveResultsND

Saves current simulation results without a dialog

CB.ScatterPrefs

Opens the Scatter Preferences dialog for the selected scatter chart

CB.ScatterPrefsND

Sets preferences for the specified scatter chart

CB.ScenarioAnalysis

Opens the Scenario Analysis tool wizard

CB.ScenarioAnalysisND

Runs the Scenario Analysis tool without using dialogs

CB.SelectAssum

Selects all assumptions in the current spreadsheet

CB.SelectChart

Selects the chart with the specified chart ID

CB.SelectDecVar

Selects all decision variables in the current spreadsheet

CB.SelectFore

Selects all forecasts in the current spreadsheet

CB.SensPrefs

Opens the Sensitivity Preferences dialog for the selected sensitivity chart

CB.SensPrefsND

Sets preferences for the specified sensitivity chart

CB.SetAssum

Changes certain attributes for the assumption in a cell

CB.SetCBAutoLoad

Sets or cancels autoloading with Microsoft Excel; determines whether Crystal Ball is set to open whenever Microsoft Excel opens

CB.SetCBWorkbookPriority

Sets the running order for macro applications when multiple workbooks are open

CB.SetDecVar

Changes certain attributes for a decision variable

CB.SetExcel2007ForegroundMode

Sets the Run Preferences foreground mode setting for Microsoft Excel 2007 in Normal speed

CB.SetFitRange

Specifies the data range to be used as input for CB.Fit

CB.SetFore

Changes the settings for a forecast

CB.SetRange

Sets the certainty range for one or all forecasts

CB.Shutdown

Closes Crystal Ball while leaving Microsoft Excel open

CB.SimResult

Returns criteria that stopped the last simulation

CB.Simulation

Runs a simulation for the specified number of iterations

CB.SingleStep

Runs one trial of a simulation, changing assumptions once

CB.StartMultiSimul

Marks the start of multiple simulations

CB.Startup

Loads Crystal Ball into Microsoft Excel if possible and indicates when Crystal Ball has been successfully opened

CB.StopMultiSimul

Marks the end of multiple simulations

CB.TrendPrefs

Opens the Trend Preferences dialog for the selected trend chart

CB.TrendPrefsND

Sets preferences for the specified trend chart

CB.TwoDSimulation

Launches the 2D Simulation tool

CB.TwoDSimulationND

Runs the 2D Simulation tool without showing dialogs

CB.WorksheetProtection

Enables and disables worksheet protection for the active worksheet