Automation Error on CreateObject("Matlab.Application") in VBA
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Vedere anche
Categorie
Scopri di più su ActiveX in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!