CQG API 4.0 - Revised
IsValid Method
See Also  Send Feedback
value_or_object
Input data of any type represented as Variant
CQGCEL Interface : IsValid Method

Glossary Item Box

Description

Checks if the argument has a valid value.

Syntax

Visual Basic
Public Function IsValid( _
   ByVal value_or_object As Variant _
) As Boolean

Parameters

value_or_object
Input data of any type represented as Variant

Return Type

True if data is valid, False otherwise.

Remarks

Currently the method checks Long, String, and Double values for validity.
Starting from v.3.0 this method also checks for validity the objects returned by CQG API. See Invalid Objects for details.

Example

The validity of the instrument property checking Copy Code
Dim TickValue As String
TickValue = IIf(CEL.IsValid(instrument.TickValue), CStr(instrument.TickValue), "N/A")

See Also