TypeName (VBScript Function)

TypeName() is a function in VBScript this is used to determine the data type of a given variable. It accepts one parameter (the variable) and returns the data type of the variable as a string.

To see a full list of the available return types of TypeName, see the data types page for VBScript.

Code Snippet

Dim MyVar

MyVar = "Hello World"

MyVar = 12

The preceding code would produce output that displayed two message boxes saying "String" and "Integer", respectively.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License