on 2014 Jul 15 3:14 PM
Hi all,
I'm trying to create multiply session parallel using VBA macro code and operate on them. Could you please support me ?
If Not IsObject(App) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set App = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(Connection) Then
Set Connection = App.Children(0)
End If
If Not IsObject(session) Then
Set session = Connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject App, "on"
End If
session.findById("wnd[0]").maximize
'session.findById("wnd[0]").Iconify
session.findById("wnd[0]/tbar[0]/okcd").Text = "KOB1"
Request clarification before answering.
Solved:
I use session.ActiveWindow() and
SESSION_ = SESSION_ + 1
Set session = Connection.Children(Int(SESSION_)) to change GIU connection
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.