Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an Excel/VBA Timer for running a macro ~once an hour? 1

Status
Not open for further replies.

jnameika

MIS
Mar 20, 2009
12
US
Is there a way to have MS EXCEL kick off a macro once an hour? (working on the Access version, but in the meantime...) I have a report that is run ~ once an hour using imported data. I can't find anything that describes a timer or event that can do such a thing. Is this something I have to code or does someone have some code I can "borrow?"

MS system tools "Scheduled Tasks" is not an option due to policy restrictions.

 
If you use application.ontime this will suit you perfectly.


for example

sub TestOntime

'put your code her

application.ontime now()+timevalue("00:01:00"), "Procedure_Name", now()+timevalue("00:00:30")

End sub


Run the sub once initally and then the sub will run every hour form then on untill you shut it down.

Hope that helps!!

Kind regards

Lee Nash

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top