time
Make sure there is no AM/PM confusion. 12:07 (just after midnight) is less
than 111:04 ( just before noon)
But
12:07 (just after noon) is greater than 11:04 (before noon)
--
Gary''s Student - gsnu2007a
"RobcPettit" wrote:
Hi, Im running a macro which updates then time in Range("a1"),
(Range("a1").Value = Time). The macro goes of does its job, updating
the time at set intervals, then when conditions are met, in
Range("a2") it adds the time now + 60 minutes. In vba I want to say if
time in a1 time in a2 then............ Ive tried simply if a1a2
then, sometimes it works, but not always. eg at the momment in a1 I
have 12:07 and in a2 11:04. vba says a2 is the greater. Is there a
better way to do this.
Regards Robert
|