CB.GetVersion

This function returns the version ID or build number of Crystal Ball. Optional parameters, VersionType and Index, determine what is returned and how much of it appears.

Table 138. CB.GetVersion Returned Data Type

Returned Value

Returned Data Type

The version ID number or build number of Crystal Ball as a string.

Variant

Table 139. CB.GetVersion Parameters

Parameter

VBA Data Type

Value or Named Constant

Index

Description

VersionType (Optional)

Variant

A constant as specified in the following two rows; if 0 or unspecified, the Crystal Ball version ID is returned as a string (equivalent to cbProductVersion)

n/a

n/a

VersionType (Optional)

Variant

cbProductVersion

0

Returns all or part of the Crystal Ball version ID, for example, 11.1.1.1.00; can be used with Index to return only a portion of the version ID

VersionType (Optional)

Variant

cbFullBuildVersion

1

Returns all or part of the Crystal Ball build number, for example, 11.1.159.0; can be used with Index to return only a portion of the build number

Index (Optional)

Integer

An integer from 1 to the number of sections in the string returned by VersionType.

n/a

Returns the specified portion of the version ID or build number, counting from left to right. If Index = 3, 159 would be returned for cbFullBuildVersion in the previous example; the maximum value for Index in this example would be 4. If Index = 0 or is not specified, the full string for VersionType is returned.