VarType (function)

<< Click to Display Table of Contents >>

VarType (function)

VarType(VarName)

Returns the data type of a Variant variable.

The possible return values are:

Type

Return value

Empty

0

Null

1

Integer

2

Long

3

Single

4

Double

5

Date

7

String

8

Object

9

Boolean

11

See also: IsDate, IsEmpty, IsNull, IsNumeric, section Special behavior of the Variant data type

Example:

If VarType(x) = 5 Then Print "Variable is of type Double"