If / Else Statements (VBScript)

If / else statements in VBScript are fairly standard as far as languages go. The syntax of an if statement is summarized by the folllowing snippet:

Dim Name

Name = InputBox("Please Enter Your Name")

If Name = "Stargazer" Then
    MsgBox("Hello Stargazer!")
ElseIf Name = "Bob" Then
    MsgBox("Hello Bob. You have a very Generic name.")
    MsgBox("Hello " & Name & ", how are you?")
End If
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License