Results 1 to 2 of 2

Thread: COM runtime error - VB.net program as client, Matlab as server

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    1

    COM runtime error - VB.net program as client, Matlab as server

    I am trying to call Matlab in my VB.Net program using COM, but it keeps opening the Matlab command window and then exiting with the run time error: object variable or With block variable not set

    I am using VS 2005 on Windows 7 and have Matlab version 7.9. I also tried using a VB.Net macro in excel and it returned to same error. The getObject(,"Matlab.Application") command also returns a cannot create activex object run time error, despite Matlab being open.

    after referencing the require matlab library, this is my code:

    Dim Matlab As Object
    Dim Result As String
    Matlab = CreateObject("Matlab.Application")

    Do you have any suggestions or tips?

  2. #2
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Zeist, The Netherlands
    Posts
    266

    Re: COM runtime error - VB.net program as client, Matlab as server

    This sounds like the COM DLL is not registered correctly. I am unfamiliar with Matlab, but maybe you should try reinstalling it. Or find out if there is a DLL you need to register separately.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width