Suppose you want to protect your program with password. You asked the user the user to enter the password. If the password is correct, the user enter into the program or if the password is incorrect, you may not provide excess to the user conditional statement are those statement in which we specify some special condition.
3. Select Case.
The If—-Then statement test we condition to specific and If true, statement (S) that follow.
If or condition is false, if condition If the statement following the If structure.
If Month = “July”
Year = “2011”
If—-Then—-Else executes a no of statement If the condition is true and other is condition is false.
If Marks <70
Then Result = “Pass”
If Marks >90
Result = “A+”
The Select Case appears one expression to different value. The advantages of Select Case over If—-Then—-Else is that if makes the code easier to read and maintain.