Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Screen Object / WaitUntil Method
The time to wait until.
Example
In This Topic
    WaitUntil Method
    In This Topic
    Waits until the specified time.
    Syntax
    expression.WaitUntil( _
       ByVal time 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.

    Example
    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
    See Also