Automation Error on CreateObject("Matlab.Application") in VBA
조회 수: 11 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 ActiveX에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!