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

Posted on 2011-05-06
Last Modified: 2012-08-13
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", "\\")
        xlApp = CreateObject("MatLab.Application", "\\")

        On Error GoTo 0

        xlMyApp = GetObject(, xlApp)

    End Sub

Open in new window

Question by:wobbled
    LVL 83

    Accepted Solution

    >xlMyApp = GetObject(, xlApp)
    Why do you need to do that? Can you not use xlApp?

    If you want to pass an empty first parameter then

    xlMyApp = GetObject(Nothing, xlApp)
    LVL 17

    Author Closing Comment

    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.


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now