Variables (VBScript)

Variables in VBScript are basic methods of storing information. Variables in VBScript are loosely typed, however they can still be coerced into various data types. See the page on VBScript Data Types for details on all data types that are available for VBScript variables.

In order to declare a variable, you use the Dim keyword.

Code Snippet

Dim MyVar
MyVar = "Hello World"

You can also initialize a variable on the same line that you declare it on.

Dim MyVar: MyVar = "Hello World"

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