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 object
expression.View( _ ByVal id As Object _ ) As View object
Exception | Description |
---|---|
IndexOutOfRangeException | This exception is thrown when the numeric value that is passed in does not match the 1 based array. |
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:
'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