View Single Post
  #2   Report Post  
Dave O
 
Posts: n/a
Default

There are probably a number of ways to skin this cat: one of them is to
use the Timer function, which returns the number of seconds elapsed
since midnight. In your case 5pm is 17 hours after midnight, which
equates to 17*60*60 or 61200 seconds. You could replace your code
If Now Mod 1 17 / 24 Then

.... with this:
If Timer = 61200 Then

This method will save you a lot of conversion of time strings to
numeric, etc.

Dave O