Adding Additional Text To Variable

One final not about variables: once you've assigned a value to variable, you don't have to throw it away in order to assign something else to the variable as well. Take a look at this script:

Dim SomeText
SomeText = "Hello there."
MsgBox SomeText
SomeText = SomeText & " I hope you're doing well today. "

Notice how in the script, we're keeping the original value of the variable and adding some additional text to it. We told the script engine that this is what we wanted to do by also using the name of the SomeText variable on the right side of the equal sign, and then concatenating its existing value with an additional value using the ampersand (&) operator. Adding on to the original value works with numbers too, but we use the + operator instead:

Dim AnyNumber
AnyNumber = 100
MsgBox AnyNumber
AnyNumber = AnyNumber + 2
MsgBox AnyNumber

First