CitectVBA Programming Reference > CitectVBA Function Reference > Conversion Functions > CVar

CVar

Converts expressions to a variant data type.

Syntax

CVar(Exp)

Exp:

A valid string, number or Variant containing a value recognizable as a string or number.

Return Value

Returns the value of the expression (Exp) provided in the argument as a variant data type.

Related Functions

CDate | CDbl | CInt | CLng | CSng | CStr

Example

Dim x as integer
Dim v as variant
v = CVar(x) 'Converts the integer value of x to a variant value in v