Hi Timothy,
starting with version 10.2 RUMBA provides integrated VBA Support.
It makes it even easier to create macros using Microsoft Visual Basic for Applications.
You may want to record a macro and save it as VBA. Rumba will generate the VBA code for you.
It’s a QuickStart to see working code snippets

Working in Rumba+
Basic operations using RumbaEmulationSessionObject
The RumbaEmulationSessionObject is used to access and handle multiple host session tasks such as:
- Connecting
- Typing
- Retrieving screen text
- Executing navigation sequences.
For a full list of RumbaEmulationSessionObject methods, properties and events, see the VBA Editor Help.

Creating a RumbaEmulationSessionObject instance
- Open a mainframe session in Rumba+.
A Session1 (Mainframe Display) object is created in the project under Rumba Objects.
This object is a RumbaEmulationSessionObject, which means you can access all of its methods and properties.
- Double-click the object.
- Type Me.
When you press the period ( . ) key, a list appears showing the available methods and properties for RumbaEmulationSessionObject.
Connection
This example shows how to establish a connection, setting the host name, port, then connecting:
Sub SetConnection()
HostName = "yourMainframe"
Port = 2023
Connect
End Sub
Simple navigation
After the connection is made, you can perform some navigation steps: such as setting the cursor position, typing text, sending emulation keys, and waiting for a screen to arrive:
Sub NavigateToTele()
WaitScreen Me, "Application:", SearchOnlyAt, False,
DefaultConnectionTimeout, 3, 2, 3, 15
SetCursorPosition 25, 7
TypeText "cics"
SendKey "Enter"
WaitScreenTimeout Me, DefaultScreenTimeout
SendKey "Clear"
WaitScreenTimeout Me, DefaultScreenTimeout
SendKey "Tab"
TypeText "tele"
SendKey "Enter"
WaitScreen Me, "Account Number : ", SearchOnlyAt, False,
DefaultScreenDataTimeout, 6, 26, 6, 44
End Sub
Basic Operations Using RumbaApplicationObject
Use RumbaApplicationObject to access and handle multiple emulation sessions (Rumba+ tabs).
For a full list of RumbaApplicationObject methods, properties and events, see the VBA Editor Help.
Opening a session
When working in the VBA Editor launched from Rumba+, you have access to RumbaApplicationObject.
For example, to open a new Mainframe session:
...
Application.CreateSession RumbaSessionType_ MainFrameDisplay
...
or, to open a saved session profile:
...
Application.OpenSessionProfile "C:\\work\\myRumbaSession.rsdm"
...
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
...
Working with External Applications
This section describes how to create VBA macros in external applications such as Microsoft Excel.
Setting up your environment
Referencing the Rumba+ Automation Objects Library
- From the VBA Editor menu bar, select Tools > References.The References windowappears.
- Check Rumba Automation Objects Library from the Available References list.
- Click OK.
Adding RumbaGlobals and ReflectionLegacySession
To add RumbaGlobals and ReflectionLegacySession, you must first export them from the Rumba+ VBA Editor, then import them into the Microsoft VBA Editor.
- Open the VBA Editor from Rumba+: Select Tools > New Macro > VBA.
- In the Project explorer, expand the Modules list, right-click RumbaGlobals and select Export File
from the pop-up menu.
- Save the file.
- In the Project explorer, expand the Class Modules list, right-click ReflectionLegacySession and
select Export File from the pop-up menu.
- Save the file.
- Close this instance of the VBA editor.
- Open the VBA Editor from Excel or another Office program: Select Developer tab > Code group >
Visual Basic.
Note: If the Developer tab is not visible, you can enable it:
- Select File > Options > Customize Ribbon
- Under Customize the Ribbon and Main Tabs, check Developer.
- Click OK.
- In the VBA Editor, select File > Import File
- Select RumbaGlobals.bas.
10.Click OK.
11.In the VBA Editor, select File > Import File
12.Select ReflectionLegacySession.cls.
13.Click OK.
Launching Rumba+ and creating a session
The following example launches Rumba+, creates a new mainframe session, sets some connection
settings, then connects to the specified host:
Sub RunRumba()
Dim App As RumbaApplicationObject
Dim Emul As RumbaEmulationSessionObject
Dim SessID As Integer
' Create Rumba Application object:
Set App = CreateObject("MicroFocus.Rumba")
'Create Mainframe Display session:
SessID = App.CreateSession(RumbaSessionType_MainFrameDisplay)
' Get Emulation Session object:
Set Emul = App.GetSession(SessID)
' Set connection parameters and connect:
Emul.HostName = "YourHostName"
Emul.Port = 23
Emul.Connect
End Sub
Working with an existing instance of Rumba+
This example searches an existing instance of Rumba+ and, if found, obtains the emulation object:
Sub UseExistingRumbaSession()
Dim App As RumbaApplicationObject
Dim Emul As RumbaEmulationSessionObject
rumbaDescriptors = RunningRumbaObjectDescriptors
If Len(Join(rumbaDescriptors)) > 0 Then
' A Rumba instance was found
Set App = GetObject(rumbaDescriptors(LBound(rumbaDescriptors)))
Set Emul = App.GetSession(App.ActiveSessionID)
' Perform session operations using Emul
End If
End Sub
The Rumba+ Script Editor is still supported and is part of the Script Engine, a separate application provided alongside Rumba+ to create and modify Rumba+ scripts.
Sample scripts are provided under RUMBA\\System\\ScriptEngine\\scripts
hope it helps