Excel VBA to Pcomm

mikeh44

Board Regular
Joined
May 7, 2008
Messages
54
Hi all,

I'm trying to connect to IBM personal communicator from excel, however I'm getting an error message "object does not support this property or method" on the line highlighted in red below: Any thoughts?

Sub Test2a()
Const IntHostWaitMs As Integer = 1000
Dim ResultStr As String, i As Integer

Dim autECLPSObj As Object
Dim autCon As Object
Dim autECLOIAObj As Object
Dim Find_Object_A


Set autCon = CreateObject("PCOMM.autECLConnMgr")
autCon.autECLConnList.Refresh
Set Find_Object_A = autCon.autECLConnList.findconnectionbyname("A")

If Find_Object_A Is Nothing Then
MsgBox "No access to Host. Is 'Session A' started ?"
GoTo ExitProcedure
End If

Set autECLPSObj = CreateObject("PCOMM.autECLPS")
Set autECLOIAObj = CreateObject("PCOMM.autECLOIA")
autECLOIAObj.SetConnectionByName ("A")

' Initialize the connection
autECLPSObj.SetConnectionByHandle (autCon(1).Handle)

'Just some commands to host session
autECLPSObj.SendKeys "[pf24]"
autECLOIAObj.WaitForInputReady IntHostWaitMs
ResultStr = autECLPSObj.GetText(8, 18, 20)


ExitProcedure:
' Release attachmate objects
'On Error Resume Next

Set autCon = Nothing
Set Find_Object_A = Nothing
Set autECLPSObj = Nothing
Set autECLOIAObj = Nothing

Exit Sub

Errorhandler:
MsgBox "error occured." & _
vbCrLf & "ErrorNo: " & Err & _
vbCrLf & "LineNo: " & Err.Line & _
vbCrLf & "Errormsg:" & _
vbCrLf & Err.Description, vbCritical, "Error"
Resume ExitProcedure


End Sub
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,221,700
Messages
6,161,371
Members
451,700
Latest member
Eccymarge

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