Branching

Take a look at this example script:

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

If you save this script in a .vbs file, then execute it using the Windows Script Host, all of the statements will be executed in order from the first statement to the last. Note that I say that all of the statements will be executed. However there are techniques that we can use to cause some statements to be executed, and some not, depending on certain conditions. This technique is called branching. VBScript supports a few different branching constructs, one of which is: the If...Else...End If.

First
Next