IF and Select Case

Decision Structures - IF and Select Case

IF ... Then Statement

The IF ... Then is a single condition and run a single statement or a block of statement.

Example, the following statement set variable Status to "Adult" if the statement is true:
        If Age >= 18 Then Status = "Adult"

You can also use multiple-line block in the If statement as followed:
        If Ago >= 18 Then 
            Status = "Adult"
            Vote = "Yes"
        End If

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions