ActiveSession Property Example

After initializing the object variable sess with a reference to the active session, this example displays the name of the session.

Sub Main()

 Dim Sys As Object, Sess As Object

 Set Sys = CreateObject("EXTRA.System")

' Assumes an open session

 Set Sess = Sys.ActiveSession

 SessionName$ = Sess.Name

 MsgBox "The active session is " +SessionName$+"."

End Sub