I use something like this:
Public RunWhen As Double
Public Const cRunWhat = "The_Sub"
Sub StartTimer()
RunWhen = Range("c3")
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
Sub The_Sub()
MsgBox ("Does this Work?")
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedure:=cRunWhat, schedule:=False
End Sub
Then I set up range("c3") to equal something like:
3/4/2002 10:08:00 AM
Start the process by simply running "Sub StartTimer()".
But I would set the timedate for sometime in the future, versus now. "Sub The_Sub()" is your procedure to run at the given time.
Hope this helps. Cheers,
Nate
This message was edited by NateO on 2002-03-04 08:16