After initializing the object variable sess with a reference to the active window, this example displays the session window with input focus.
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveWindow
SessionName$ = Sess.Name
MsgBox "The session with input focus is " +SessionName$+"."
End Sub