Hello,
I am trying to send control keys to Reflection from Excel using VBA. I have successfully started a reflection session and have sent text to the screen.
What I have been unable to figure out is how to “press enter button”, or pass any control key.
Any assistance is greatly appreciated.
Using: Win7; Excel 2010; Attachmate Reflection Standard Suite 2011_15.3.436.0, Version R1 (15.3436.0)
The following is the VBA code from Excel:
Sub CreateReflectionObject()
'the following are the references which are selected
'Library Attachmate_Reflection_Objects
' C:\Program Files (x86)\Attachmate\Reflection\Attachmate.Reflection.Objects.tlb
'Library Attachmate_Reflection_Objects_Emulation_IbmHosts
' C:\Program Files (x86)\Attachmate\Reflection\Attachmate.Reflection.Objects.Emulation.IbmHosts.tlb
Const rcIBMEnterKey As Integer = 13
Set Ribm = CreateObject("ReflectionIBM.Session")
Ribm.Visible = True
With Ribm
.Hostname = "PRDPLEX-TN3270A.FGMFCON.COM"
.Connect
End With
With Ribm
.TransmitANSI "l cicsa1b2"
'none of the following examples work
.TransmitTerminalKey ([ENTER])
.TransmitTerminalKey rcIBMEnterKey
.TransmitTerminalKey (ControlKeyCode_Transmit)
.SendControlKey (rcIBMEnterKey)
.Transmit (ControlKeyCode_Transmit)
End With
End Sub
I am trying to send control keys to Reflection from Excel using VBA. I have successfully started a reflection session and have sent text to the screen.
What I have been unable to figure out is how to “press enter button”, or pass any control key.
Any assistance is greatly appreciated.
Using: Win7; Excel 2010; Attachmate Reflection Standard Suite 2011_15.3.436.0, Version R1 (15.3436.0)
The following is the VBA code from Excel:
Sub CreateReflectionObject()
'the following are the references which are selected
'Library Attachmate_Reflection_Objects
' C:\Program Files (x86)\Attachmate\Reflection\Attachmate.Reflection.Objects.tlb
'Library Attachmate_Reflection_Objects_Emulation_IbmHosts
' C:\Program Files (x86)\Attachmate\Reflection\Attachmate.Reflection.Objects.Emulation.IbmHosts.tlb
Const rcIBMEnterKey As Integer = 13
Set Ribm = CreateObject("ReflectionIBM.Session")
Ribm.Visible = True
With Ribm
.Hostname = "PRDPLEX-TN3270A.FGMFCON.COM"
.Connect
End With
With Ribm
.TransmitANSI "l cicsa1b2"
'none of the following examples work
.TransmitTerminalKey ([ENTER])
.TransmitTerminalKey rcIBMEnterKey
.TransmitTerminalKey (ControlKeyCode_Transmit)
.SendControlKey (rcIBMEnterKey)
.Transmit (ControlKeyCode_Transmit)
End With
End Sub