Freelance Writing Jobs | Today's Articles | Sign In

 
Browse Sections

Conditional statements


match. test_expression may be any numeric or string expression. Consider an example in which you want to print a message to the user based on what country the user lives in. The code may look like this:

 Select Case Country
Case "The USA"
msgbox "The capital of the USA is Washington"
Case "Russia"
msgbox "The capital of Russia is Moscow"
Case "Canada"	
msgbox "The capital of Canada is Ottawa"
Case Else 
msgbox "Please, enter the name of your country"
End Select 
The copyright of the article Conditional statements in VB Script is owned by Maxim Karetnikov. Permission to republish Conditional statements in print or online must be granted by the author in writing.

Go To Page: 1 2 3

Articles in this Topic    Discussions in this Topic