Syntax
| TypeName[$](var)
| ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Return a string indicating the type of value stored in var.
| ||||||||||||||||||||||||||||||||||||||||
See Also
| |||||||||||||||||||||||||||||||||||||||||
Example
| Sub Main
Dim X As Variant
Debug.Print TypeName(X) '"Empty"
X = 1
Debug.Print TypeName(X) '"Integer"
X = 100000
Debug.Print TypeName(X) '"Long"
X = 1.1
Debug.Print TypeName(X) '"Double"
X = "A"
Debug.Print TypeName(X) '"String"
Set X = CreateObject("Word.Basic")
Debug.Print TypeName(X) '"Object"
X = Array(0,1,2)
Debug.Print TypeName(X) '"Variant()"
End Sub
|