I am trying to write macros in VBA to connect Excel to a current session of Reflection 2011. I used to use an older version of Reflection and this was rather easy. However, I have been upgraded to Reflection 2011 and this is more difficult. The code I have from using the help guides is:
Dim App As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim screen As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmScreen
Dim Terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
Dim Frame As Attachmate_Reflection_Objects.Frame
Dim View As Attachmate_Reflection_Objects.View
Set App = GetObject(, "Attachmate_Reflection_Objects_Framework.ApplicationObject")
Set Terminal = App.CreateControl("C:\MAIN.rd3x")
Set screen = Terminal.screen
Set Frame = App.GetObject("Frame")
Frame.Visible = True
Set View = Frame.CreateView(Terminal)
The problem is this code opens a new frame (Tab) within Reflection rather that using the current one. I am not sure if I have to change the Set View, Set Frame, etc... I have tried to use Set View = Frame.GetViewsByName but I am getting a compile error: Object required.
Can anyone help with the code that should go in the beginning of the Excel macro so that it connects to the current session of Reflection 2011. Thank you
Dim App As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim screen As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmScreen
Dim Terminal As Attachmate_Reflection_Objects_Emulation_IbmHosts.IbmTerminal
Dim Frame As Attachmate_Reflection_Objects.Frame
Dim View As Attachmate_Reflection_Objects.View
Set App = GetObject(, "Attachmate_Reflection_Objects_Framework.ApplicationObject")
Set Terminal = App.CreateControl("C:\MAIN.rd3x")
Set screen = Terminal.screen
Set Frame = App.GetObject("Frame")
Frame.Visible = True
Set View = Frame.CreateView(Terminal)
The problem is this code opens a new frame (Tab) within Reflection rather that using the current one. I am not sure if I have to change the Set View, Set Frame, etc... I have tried to use Set View = Frame.GetViewsByName but I am getting a compile error: Object required.
Can anyone help with the code that should go in the beginning of the Excel macro so that it connects to the current session of Reflection 2011. Thank you