Escolar Documentos
Profissional Documentos
Cultura Documentos
Chapter 4
Making Decisions
If expression Then
statement
(more statements may follow)
End If
Nested If Statements
Else
End If
Logical Operators
• If the expression is true, the Not operator returns False, and if the
expression is false, it returns True, as shown in the following truth
table:
Expression Not Expression
True False
False True
strWord1 = "HELLO"
strWord2 = "hello"
If strWord1 = strWord2 ' False, not equal
If strWord1.ToLower() = strWord2.ToLower() ' True, equal
strNumber = "123abc"
If IsNumeric(strNumber) ' Returns false
Position 0 Position 9