Creating and assigning variables

VBScript allows you to create variables on the fly, as simple as this:

x = 24

which creates a variable, x, and gives it the value 24.

With VBScript you don't need to worry about data types. All of this is managed for you. So all of this is a valid, if pointless, sequence:

Sub MyTest

x = 24 

x = "Hello" 

y = 12 

x = x & " " & y 

End Sub

The last line shows how to concatenate strings in VBScript - it also demonstrates that the language is smart enough to know that, in this instance, you want a number to be treated as text. The end value of x is "Hello 12".