Activate Method Example

Making each open session the active window, this example displays the name of the session that is currently active.

Sub Main()

 Dim Sys As Object, Sess As Object

 Set Sys = CreateObject("EXTRA.System")

' Assumes one or more open sessions

 Set Sess = Sys.ActiveSession

 For i=1 to Sys.Sessions.Count

  Set Sess=Sys.Sessions.Item(i)

  MsgBox "Activating session " + Sess.Name + "."

  Sess.Activate

 Next

End Sub