Link to home
Start Free TrialLog in
Avatar of wobbled
wobbledFlag for United Kingdom of Great Britain and Northern Ireland

asked on

I can create an object on a remote PC, but can not do anything with that

I am trying to fire up an instance of the MatLab application on a remote PC and then get a handle on this application so I can try to control it.  I am able to start the application up without any problems, but I then get an error saying "Cannot create ActiveX component" on the GetObject part of the code

I also get an error when I create the object, but as I've said it does actually start the application on the remote PC.  I put in the On Error Resume Next just to force it past this for my testing purposes.

Any ideas?


Sub CreateRemoteExcelObj()
        Dim xlApp As Object
        Dim xlMyApp As Object

        On Error Resume Next

        xlApp = CreateObject("MatLab.Application", "\\1.1.1.1")
        MsgBox(xlApp.Version)
        
        xlApp = CreateObject("MatLab.Application", "\\1.1.1.1")

        On Error GoTo 0

        xlMyApp = GetObject(, xlApp)
        MsgBox(xlMyApp.Name)

    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wobbled

ASKER

Thanks - you were correct in your answer so I gave you the points.  What was actually causing the problem was a Microsoft Patch that was screwing up remote control calls on the remote PC.

Cheers