Learn Macros‎ > ‎VBA Macros‎ > ‎

Add Timer to your code

posted Jan 30, 2011, 6:06 AM by Ayush Jain   [ updated Jan 30, 2011, 6:07 AM by ayushjain@live.com ]


To create a macro to measure time before executing the next line of code use this simple code.

Sub timer ()

Application.Wait Now + TimeValue("00:00:10")
MsgBox ("10 sec has elasped")

End Sub

Comments