Siebel VB Language Reference > Siebel VB Language Reference >

CVar Function


This standard VB function converts an expression to the data type variant.

Syntax

CVar(expression)

Argument
Description
expression
Any expression that can evaluate to a number

Returns

The expression as an expression of type variant.

Usage

CVar accepts any type of expression.

CVar generates the same result as you would get by assigning the expression to a variant variable.

Example

This example converts a single variable to a variant variable.

Sub Button_Click
   Dim singleAnswer as Single
   Dim variantAnswer as Variant
   singleAnswer = 100.5
   variantAnswer = CVar(singleAnswer )
end Sub

See Also

CCur Function
CDbl Function
CInt Function
CLng Function
CSng Function
CStr Function
CVar Function
CVDate Function


 Siebel VB Language Reference
 Published: 18 June 2003