InfoConnect for Unisys VBA Guide
View(Object) Function
A Variant String or Long.
Gets a View object relative to its title or its indexed position in the views of a given frame.
Syntax
object.View( _
   ByVal id As Object _
) As _View

Parameters

id
A Variant String or Long.

Return Value

A View object.
Exceptions
ExceptionDescription
System.IndexOutOfRangeExceptionThis 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.
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

 

 


2015 Attachmate

Send Feedback