VBA CVar Function: The CVar function in VBA converts an expression into a Variant data type.

Syntax

Parameter

Expression (required) – This parameter represents the expression that that you want to convert to a Variant data type wherein it can hold numeric, string, or date values.

Return

This function returns a variant value after converting the supplied expression into a Variant data type.

Example 1

Output

100

VBA CVar Function

Example 2

Output

Hello VBA

VBA CVar Function

Example 3

Output

10/10/2020

Pin It on Pinterest

Share This