The VBA CVAR function is listed under the data type conversion category of VBA functions. When you use it in a VBA code, it converts an expression into a variant data type. In simple words, a variant data type value can hold numeric, string, or date values. Learn more about variant data type from here.
Expression: The value which you want to convert to a string data type.
To practically understand how to use VBA CVAR function, you need to go through the below example where we have written a vba code by using it:
Sub example_CVAR() Range("B1").Value = CVar(Range("A1")) End Sub
In the above example, we have used the value from cell A1 (Excel Champs) and then we have used the CVARvto convert that value into a variant data type and it has returned Excel Champs in the result.