VBA Macro PCOMM

dribei16

New Member
Joined
Oct 15, 2010
Messages
22
I was wondering, is there a way for a VBA Macro to access a IBM Personal Communications instance, feed it some data and then retrive information to excel? I looked all around the net for it and I found some stuff but could not really understand it. Apparently some guy used an Object of type PCOMM.autECLConnMgr and did it Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Yes, I am trying to do some automation using this I am getting some errors which I am really not able to understand. Is it possible for you to support .
Problem 1:
My Macro 1 – Sub XA() Dim Mgr As Object Dim Obj As Object Dim Hand As Long Dim PS As Object Set Mgr = CreateObject("PCOMM.autECLConnMgr") Set PS = CreateObject("PCOMM.autECLPS") Mgr.StartConnection ("profile=C:\XA_MACRO\TEST.WS connname=X") End Sub
My Macro 2- Private Sub abcdX() Dim autECLPSObj As Object Dim autECLConnList As Object Set autECLPSObj = CreateObject("PCOMM.autECLPS") Set autECLConnList = CreateObject("PCOMM.autECLConnList") ' Initialize the connection autECLConnList.Refresh autECLPSObj.SetConnectionByName ("X") autECLPSObj.SendKeys "AL", 5, 21 autECLPSObj.SendKeys "[ENTER]", 5, 21 autECLPSObj.SendKeys "[ENTER]", 5, 21 autECLPSObj.SendKeys "[ENTER]", 5, 21 autECLPSObj.SendKeys "EPDM", 20, 7 autECLPSObj.SendKeys "[ENTER]", 5, 21 autECLPSObj.SendKeys "6", 20, 7 autECLPSObj.SendKeys "[ENTER]", 5, 21 End Sub

They work when run individually or by using a call function. but I would like to write them in one macro.

Problem 2:
not able to use WaitForInputReady, WaitForSystemAvailable, and WaitForAppAvailable even when I call in autECLOIAObj. Do you have any idea why does this happen. Do I need to call any additional objects ?



It has been a very long time, but I used it extensively.

You need anything?
 
Upvote 0
I've used it extensively.
Problem 1, how about putting your code up on github so its a little easier to read? then I can advise on that.
Problem 2, are you calling the objects like this ?

Here is how I do it in VB.NET code...

PCommsPause = CreateObject("PCOMM.autECLOIA")
PCommsPause.WaitForAppAvailable()
PCommsPause.WaitForInputReady()

And example of VBA Script code:

autECLSession.SetConnectionByName(ThisSessionName)
'wait until RCMS is ready
Sub RCMSWait
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,145
Messages
6,183,145
Members
453,148
Latest member
yevhen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top