Timing trigger

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone suggest suitable code to insert into an existing piece of code,
which will allow it to run only between certain hours each day.
Thanks
 
Dave said:
Can anyone suggest suitable code to insert into an existing piece of code,
which will allow it to run only between certain hours each day.


How about putting the code in an If block:

If TimeValue(Now) > #7:00# And TimeValue(Now) < #17:00# Then
' your code here
Else
MsgBox "not now"
End If
 
That worked
Thanks
--
Dave Hawks


Marshall Barton said:
How about putting the code in an If block:

If TimeValue(Now) > #7:00# And TimeValue(Now) < #17:00# Then
' your code here
Else
MsgBox "not now"
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top