expression.Focus()
where expression is a variable that represents a View Object
expression.Focus()
Sub ChangeFocus() Dim positionInString As Variant Dim viewTitle As String 'Reflection objects required to open a new session Dim views() As Attachmate_Reflection_Objects.View Dim View As Variant 'Get the text to copy from the current session projectName = ThisIbmScreen.GetText(1, 39, 5) 'Get all the view objects in the frame and print the title of each view views = ThisFrame.GetViewsByName("") For Each View In views 'Get the view title viewTitle = View.titleText 'If the view title contains session2, change the focus to that session positionInString = InStr(viewTitle, "session2") If positionInString > 0 Then View.Focus End If Next End Sub