Getting the active session

Getting the active session for further work

...
    Dim RumbaActiveSession As RumbaEmulationSessionObject
    Set RumbaActiveSession = Application.GetSession(Application.ActiveSessionID)
    ' further work with the session object
    RumbaActiveSession.Connect
...

Getting a session by its tab name

...
    Dim RumbaActiveSession As RumbaEmulationSessionObject
    Set RumbaActiveSession = Application.GetSessionByName("MF1")
    ' further work with the session object
    RumbaActiveSession.Connect
...
	

Getting a session by its tab index

...
    Dim RumbaActiveSession As RumbaEmulationSessionObject
    Set RumbaActiveSession = Application.GetSession (2)
    ' further work with the session object
    RumbaActiveSession.Connect
...