This works for me:
''''''''''''''''''''''''
Dim X As Double, Y As Double
X = 3
Y = 3
If X = Y Then
MsgBox ("They are equal")
Else
MsgBox ("They are not equal")
End If
''''''''''''''''''''''''''''''''''''''
--
steveb
(Remove 'NOSPAM' from email address if replying direct)
"rocky640 " wrote in message
...
True Or False, no matter what... it still displays the false statement
If X = Y then
msgbox("They are equal")
else
msgbox("They are not equal")
end if
Ok, both X and Y are set to 3. But, the message box "They are not
equal" is still shown.
I know that both X and Y is set to 3 because when the macro is running
I but my curser over the variable and it tells me it is equal to 3.
---
Message posted from http://www.ExcelForum.com/