CVAR

CVAR(expression)

Returns the expression converted to a variant data type (Variant).


expressionThe expression to evaluate and convert to a variant.

REMARKS
* The Variant data type is capable of holding any type of data except fixed-length strings and user defined types.
* The "expression" can be the same range as a double for numeric expressions.
* The "expression" can be the same range as a string for non-numeric expressions.

Dim iValue As Integer 
Dim vString As Variant
iValue = 25
vString = CVar(iValue & " hello")
Debug.Print vString '= "25 hello"

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top