View Full Version : Stop running macro after specific time

01-19-2010, 08:40 PM

I need to stop running a macro and shut down the computer after 10pm. Is there a syntax to do it?

I have been trying to use ontime but it does not seem to work....

01-20-2010, 12:33 AM
I am not clear which part of your task you were unable to accomplish with ontime. If it was the shutting down of the macro I would suggest using a timer inside the macro. If you had trouble with shutting down the PC you might want to take a look at http://www.vbaexpress.com/kb/getarticle.php?kb_id=515. I didn't test the proposed shutdown routines, but they seemed straightforward.