Thread: Time and If...
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
MB[_4_] MB[_4_] is offline
external usenet poster
 
Posts: 4
Default Time and If...

I understand your comments, another reason why I am avoiding system time is
that over the course of a day, whilst this set of procedures are running, my
system clock loses between four and twelve minutes. Once the procedures have
finished, if I reboot, then my system clock returns to the normal time.
Thanks to Dave Peterson and Dana DeLouis, I have the options of VBA and VBS
for updating the system clock.

I have run your code and mine and the conclusion I have come to is that the
solution to my problem is probably in the area of "NavyTimePos1 " or
"NavyTimePos2", rather than the "If" portion of the code. I'll put specific
error traps in and see what comes back - difficult to test as I'm looking
for an anomaly that can occur 4/5 times in 12 hours. If you think I'm on the
wrong track completely, can you please say so.

Finally, sorry to go on, what is the difference between
TimeValue("00:01:00") and #00:01:00# and when and why should one version be
used rather than the other?

Thanks
Martin

keepITcool wrote in message ...
s/b if abs(navytime - time) #00:00:01# then

keepITcool