Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.UserInterface Library / Frame Object / View Method / View(Object) Method
A Variant String or Long
Example
In This Topic
    View(Object) Method
    In This Topic
    Gets a View object relative to its title or its indexed position in the views of a given frame.
    Syntax
    expression.View( _
       ByVal id As Object _
    ) As View object 
    where expression is a variable that represents a Frame Object

    Parameters

    id
    A Variant String or Long

    Return Value

    A View objectThis is a View Object.
    Exceptions
    ExceptionDescription
    This exception is thrown when the numeric value that is passed in does not match the 1 based array.
    Remarks

    When the id parameter is passed as a string, it specifies the title of a view. When id is passed as a Long, it specifies the 1 based index of the view in a given frame. The index value depends on the Workspace UI Preferences settings:

    • The index is based on the left to right progression of tabs. The user can rearrange this order by dragging tabs with the mouse.
    • The index is determined by the order in which the Windows are opened. The user cannot change this order.
    • There is only one view per frame.

    For more about using the View method, see:

    Using the Reflection Object Model

    Close Open Systems Sessions Gracefully

    Handle TLS Authentication

    Dynamically Create a Session

    Get Screen Data With an Excel Macro

    Dynamically Change the User Interface

    Example
    These examples get views based on index position and title text.
    'Get a view based on its index position 
    Sub Test_ViewVariantIndex()
       Dim myView As View
       Dim id As Variant
       
       id = 1
        
       Set myView = ThisFrame.View(id)
       myView.TitleText = "Application"
     
    End Sub
     
    'Get a view based on its title text
    Sub Test_ViewVariantString()
    Dim myView As View
       Dim id As Variant        
        
       id = "Application"
        
       Set myView = ThisFrame.View(id)
       myView.TitleText = "Application"
     
    End Sub
    See Also