TypeName

Return variable type (variant subtype).

Syntax 
      TypeName(varname)

Key
   varname    The name of the variable

TypeName() has the following return values:

Value Description
Byte Byte value
Integer Integer value
Long Long integer value
Single Single-precision floating-point value
Double Double-precision floating-point value
Currency Currency value
Decimal Decimal value
Date Date or time value
String Character string value
Boolean Boolean value; True or False
Empty Uninitialized
Null No valid data
<object type> Actual type name of an object
Object Generic object
Unknown Unknown object type
Nothing Object variable that has been explicitly set to Nothing, or has been set to return the value of a function that returned Nothing
Error Error
Variant() A Variant array

Examples

Dim MyType
MyType = TypeName("SS64") ' Returns "String".
MyType = TypeName(4) ' Returns "Integer".
MyType = TypeName(37.50) ' Returns "Double".

“Who looks outside, dreams; who looks inside, awakes” - Carl Gustav Jung

Related:

Dim - Declare a new variable or array variable
Equivalent Powershell command: $arrDemo.getupperbound(0) or $arrDemo.length-1


© Copyright SS64.com 1999-2014
Some rights reserved