Keep Awake Nudge
You could use two OnTime macros that call each other every 15 minutes.
Sub WakeUp()
Application.OnTime Now + TimeValue("00:15:00"), "Nudge"
End Sub
Sub Nudge()
Application.OnTime Now + TiveValue("00:15:00"), "WakeUp"
End Sub
"Bill Martin" wrote:
I'm running Excel 2003 under XP. Sometimes if I run an optimization
routine for an extended period VBA occasionally seems to get confused
and produce an error if the computer enters "sleep" mode. Not always,
but unpredictably. Then the computer hangs up waiting for me and I'm
not there to help it.
is there something I can do with VBA every ten minutes or so to give
XP a small keep awake nudge? When I think to do it, I manually turn
off the sleep mode before running a long optimization, but
unfortunately the human element (me) is not reliable enough.
Thanks.
Bill
|