I was just working on fixing another programmer's code, and he has apparently
been told about the fact that you can omit comparisons with zero for If Then
statements because zero is false, and non-zero is True. The trouble is, he
generalized that statement to mean things it doesn't and has some very bad
logic as a result.
It was something like this...
If InStr(str1, "ABC") And Not InStr(str1, "DEF") Then
Of course, "And" is going to do a binary comparison here, so it will generally
fail to work properly when "DEF" is in the string. In most cases, the branch
-will- execute when "DEF" is in there.