Problems with macro that interacts with PCOMM

jplank

Board Regular
Joined
Sep 19, 2012
Messages
62
I'm struggling with a problem involving a macro that connects with PCOMM 6.0. My computer uses Windows 7 and Excel 2007. The code I'm trying to run is:

Code:
Dim NumFields As LongDim autECLPSObj As Object
Dim autECLConnList As Object
Set autECLPSObj = CreateObject("PCOMM.autECLPS")
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
 
' Initialize the connection
autECLConnList.Refresh
autECLPSObj.SetConnectionByHandle (autECLConnList(1).Handle)
 
autECLPSObj.SetCursorPos 19, 43
autECLPSObj.SendKeys "username"

This is almost verbatim from the documentation here, but it causes excel to hang. The problem appears to be using the SendKeys. I've also tried to use the SetKeys with similar results. Other examples in the documentation seem to work fine. I'm able to move the cursor and identify the fields that are visible on the PCOMM screen. But any attempt I make to actually input data to PCOMM via vba cause vba and excel to hang. I'm relatively new to writing macros to interact with PCOMM and just wondering if anyone has any experience that might be able to shed some light on what I might be doing wrong? Thanks!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,225,201
Messages
6,183,523
Members
453,166
Latest member
Retiredexceluser

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