The Not operator

 

The Not operator

 

If Not (Condition) then

        Statement

        Statement

End if

 

 

For example

 

decCommission   = 0

 

If decSales > 300000

If Not blnManagement   then

decCommission  =decSales * .03

End If

End If

 

 

q       When using the logical operator Not the conditional statements will only be executed if the condition is False.

q       Using the Not operator is generally avoided. It is often more understandable to state the condition in the positive even if it means having an empty branch.

 

            decCommission   = 0

 

If decSales > 300000

If blnManagement

                                                'Intentionally left empty

Else

decCommission = decSales * .03

End If