That is a really strange thing you've discovered. Must be something to do with the implementation of the compare function that VB uses.

On another front, you might find it easier to do comparisons like this easier if you use the Select statement instead of nested ifs

VB Code:
  1. Select Case aa
  2.         Case Is < bb
  3.             MsgBox aa & "<" & bb
  4.         Case Is = bb
  5.             MsgBox aa & "=" & bb
  6.         Case Is > bb
  7.             MsgBox aa & ">" & bb
  8. End Select

Makes it easier to read and debug.

Just thought you might want to know.