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
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