View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Anthony[_15_] Anthony[_15_] is offline
external usenet poster
 
Posts: 18
Default Working with times - Bug?

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