AND IF

These keywords are used in an IF control structure to test expressions sequentially until one of them is FALSE or all of them are TRUE.

Expressions separated by AND IF are evaluated from left to right until one is found to be FALSE. As in a regular AND if all expressions evaluate to TRUE then the test is TRUE, however unlike a regular AND, evaluation of expressions ceases when one expression of many returns FALSE.

You cannot mix AND IF and OR IF keywords on the same line.

Hint:

if you want a mixture of And & Or conditions a creative use of parentheses (brackets) will help.

Ie.

 If (((x=1) Or (y=1)) And bNote_XY) And (bThis Or bThat Or bTheOther) Then

See also