|
IF...
...
ELSE
...
END IF
If and end if appear in pairs, but sometimes only one result is needed. For example, in the above example, it is a multiple of 3 to give a prompt instead of no prompt. There is no else, and end if is not necessary, such as:
Dim s As Integer
s = Text1.Text
If s Mod 3 = 0 Then x = MsgBox("It is a multiple of 3", vbOKOnly, "Value judgment") |
|