Automation Error on CreateObject("Matlab.Application") in VBA
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an application that was previously working fine, running VBA code in Microsoft Access and working with MatLab as a COM Server. But I had to rebuild my computer, and lost my previous MatLab installation. So, I have currently installed a trial version of MatLabR2020b.
When I hit this VBA line:
Set m_objMatLab = CreateObject("Matlab.Application")
I get an error: " Run-time error '-2147467259 (80004005)'; Automation error Unspecified error"
I notice that the minimized MatLab icon briefly appears on the task bar, but then disappears; so it's obvious that it's instantiating the MatLab process.
I get the same error if I use the VBA syntax
Set m_objMatLab = New MLApp.MLApp
(with a project reference added to "MatLab Automation Server Type Library" )
Also, if I follow the instructions in this answer to check the functionality of the MatLab as an ActiveX server by exexuting "h = actxserver('Matlab.Application')", it works fine ... I get the response "h = COM.Matlab_Application"; and then with "h.Execute('plot(1:10)')", the plot comes up fine.
Is it possible that the trial version of MatLab disallows use via ActiveX Automation ?
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu ActiveX finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!