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