» Execute Command/Sub-Procedure Using Timer in VBA
CATEGORY - Date & Time in VBA
VERSION - All Microsoft Excel Versions
TimeValue Function is used.
In this example, 3-seconds is assigned to the function.
The Application.OnTime alertTime statement is used to call up the sub procedure, msg, when 3-seconds is up.
Sub timerMsg()
Dim alertTime
MsgBox "The alarm will go off in 3 seconds!"
alertTime = Now + TimeValue("00:00:03")
Application.OnTime alertTime, "msg"
End Sub
Sub msg()
MsgBox "Three Seconds is up!"
End Sub
Book Store:
Recommended Books:
- The Total Money Makeover. : A Proven Plan for Financial Fitness
- Financial Risk Manager Handbook, Second Edition
- Real Estate Finance and Investments (Real Estate Finance and Investments, 11th Ed)
- Microsoft Access 2002 for Dummies
- Special Edition Using Microsoft Access 2002
- Getting to Yes: Negotiating Agreement Without Giving In
Execute Command/Sub-Procedure Using Timer in VBA
rdwray@isp.com
Took you code and pasted into excel after trying my own and cannot get either one to work in 2002.


the .OnTime is highlighted and a message comes up saying:
Method or data member not found