The a1 and b1 was just to show you that I was using the values of the cells
and not my actual code, it was an easy to read version of what I have.
Thank you for your reply.
Regards
Anthony
"FSt1" wrote in message
...
hi
i don't think this is a bug but rather a syntax thing.
as you have writted it, VB can't read the values in A1 and B1. try this...
If Range("A1") = Range("B1") Then
or
If [A1] = [B1] Then
regards
FSt1
"Anthony" wrote:
Hi,
I am using excel 07 in compatibility mode, due to the compay i work for
only
have excel 03.
I have come across what seems to be a bug in excel vba or how it uses
time
in calculations;
I wondered if anyone has had similar issues;
Cells formatted [h]:mm
A1 = 45:30
B1 = 45:30
in vba i had ;
if(a1= b1) then
do some stuff to sheets
else
do something else
end if
This always went to the else section of the statement.
I even used a msgbox to display the decimal values to view what the code
was
seeing and they were exactly the same.
To get this to work I had to do the calculation on the worksheet and then
just test the cell value.
Anyone any idea? is it a bug or just something I have done wrong?
regards
Anthony