I am writing some VBA code to read values from an excel file, put those values into an AS400 window and then scrape some values off that AS400 window. I am using VBA 6.0, and IBM Iseries Access for Windows (PCOMM) v5.7.
My code, so far, is as follows:
However, the SessionList count always comes back as zero so when the SetConnectionByName attempts to execute it generates a run-time error.
I have an active PCOMM session running and on the desired screen when I run this code.
Suggestions, anyone?
Thank you.
My code, so far, is as follows:
Code:
Public Sub TestRoutine()
Dim PS As AutPS
Dim IA As AutOIA
Dim SessionList As AutConnList
Set SessionList = CreateObject("pcomm.auteclconnlist")
NumberOfSessions = SessionList.Count
Set IA = CreateObject("PCOMM.autECLOIA")
Set PS = CreateObject("PCOMM.autECLPS")
IA.SetConnectionByName ("A")
PS.SetConnectionByName ("A")
PS.SendKeys "504878", 3, 11
Stop
End Sub
However, the SessionList count always comes back as zero so when the SetConnectionByName attempts to execute it generates a run-time error.
I have an active PCOMM session running and on the desired screen when I run this code.
Suggestions, anyone?
Thank you.