[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-05-06
2
Medium Priority
?
243 Views
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", "\\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

0
Comment
Question by:wobbled
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35706143
>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)
0
 
LVL 17

Author Closing Comment

by:wobbled
ID: 35719193
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

867 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