Applies To
Application Object.
Description
Pauses a macro that is running until a specified time is reached.
Important
The Wait method suspends all Microsoft Excel activity and may prevent you from performing other operations on your computer. Background processes, such as printing and recalculation, are continued.
Syntax
object.Wait(time)
object
Required. The Application object.
time
Required. The time you want the macro to resume, in Microsoft Excel date format.
Example
This example pauses a running macro until 6:23 P.M. today.
Application.Wait "18:23:00"
This example pauses a running macro for approximately 10 seconds.
newHour = Hour(Now()) newMinute = Minute(Now()) newSecond = Second(Now()) + 10 waitTime = TimeSerial(newHour, newMinute, newSecond) Application.Wait waitTime