Visual Basic If…Else Examples
If intAge >= 18 Then
MsgBox(“Able to Vote”)
Else
MsgBox(“To Young to Vote”)
End If
If intScore >= 60 Then
MsgBox(“You passed”)
strGrade = "P"
Else
MsgBox(“You did not pass”)
strGrade = "F"
End If
If intAge < 21 Then
MsgBox( “Underage”)
Else
MsgBox( Of Legal Age”)
End If