Hello - My organization uses Rumba version 7.5.1 and i am trying to write a VBA macro to connect Microsft Excel to Rumba so that i can copy/paste information to/from Excel and rumba. Here is the code i used -
Private Declare Function WD_CopyFieldToString Lib "Ehlapi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String, ByVal Length) As Integer
Private Declare Function WD_CopyStringToField Lib "Ehlapi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer, ByVal Buffer As String) As Integer
Private Declare Function WD_Sendkey Lib "Ehlapi32.dll" (ByVal hInstance As Integer, ByVal KeyData As String) As Integer
Private Declare Function WD_SetCursor Lib "Ehlapi32.dll" (ByVal hInstance As Integer, ByVal Position As Integer) As Integer
Private Declare Function WD_SetSessionParameters Lib "Ehlapi32.dll" (ByVal hInstance As Integer, ByVal SSPData As Long) As Integer
Private Const ENTER As String = "@E"
Private Sub CommandButton1_Click()
C = WD_ConnectPS(100, "A") ' Connecting to Rumba where 'A' is the first session.For 2nd session provide a value 'B'
Y = Sheet1.Cells(10, 5)
X = WD_CopyStringToField(100, 24, Y) ' At the position of 48, macro will put the value of Y
E = WD_Sendkey(100, "@E") ' Enter command
Z = WD_CopyFieldToString(100, 52, V, 7) ' Macro will pick a string of lenght 7 from the position 52 and will put it into "V" buffer
ThisWorkbook.Worksheets(Sheet1).Cells(1, 2) = V ' Putting the value of "V" back to excel
End Sub
#Rumba
#Macro
#Excel
#Vba




