View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default comparing values in excel with vb6

The test worked for me both in Excel and in VB.

--
Regards,
Tom Ogilvy

"jim_budd (removethis) @csgsystems.com"
wrote in message
...
I am writing a macro that compares a date and time in
worksheetA with with a date and time in worksheetB. The
date and time are in separate columns. The time is
calculated in worksheetB from a text value (0500) imported
from a Data Base with the formula =value(left(d7,2)/24 In
worksheetA the time value is calculated with the formula
=5/24. I do a comparison to determine if these values are
equal in excel by the formula =worksheetA!b7=worksheetB!b8
and recieve a true return. The same two cells in vb do
not compare equally in an if statement and go to an else
statement the says worksheetA!b7 < worksheetB!b8. I have
tried copying the value of one cell to the other without
and change in result. Any suggestions. Thanks in advance
for your help!