Returns the expression converted to a variant data type (Variant).
|expression||The expression to evaluate and convert to a variant.|
|* 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"
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top