I have 2 sessions open and both ended up having the same Session ID: “A”.
- Personal Communications iSeries Access for Windows (
old session
). Version: 5.7 for Windows - IBM i Access Client 5250 Emulator (
new session
). Version: 1.1.9.3
VBA code:
Set aPS = New AutPSTypeLibrary.AutPS
aPS.SetConnectionByName ("A")
aPS.GetText(18, 7, 4)
aPS.SetText "X123", 18, 7
What is happening:
SetText is getting invoked only on new session
.
GetText is getting invoked only on old session
.
What I tried:
- Session ID only exists in
old session
: It won’t work at all - Session ID only exists in
new session
: It won’t work at all Old and new session
with same session ID: Get work onold session
. Set work onnew session
.
Note: I recently installed EHLLAPI to connect the Excel VBA and the new session
but before this, I had no issue with the old session.
So how can I control it so that the VBA will work correctly even if both sessions have the same name?