Waits until the specified time.
expression.WaitUntil( _
ByVal As Date _
) As ReturnCode
where
expression is a variable that represents a
Screen Object
Parameters
- time
- The time to wait until.
Return Value
One of the following ReturnCode enumeration values.
Member |
Description |
Cancelled |
Cancelled. |
Error |
Error. |
PermissionRequired |
Permission is required. |
Success |
Success. |
Timeout |
Timeout condition. |
Truncated |
The text is truncated. |
This example waits until a specified date and runs a simple command on that date.
Sub Test()
Dim mydate As Date
mydate = DateValue("February 4, 2021")
ThisScreen.WaitUntil (mydate)
'Set up commands you want to run on this date
Debug.Print "demo"
End Sub