MWInitAppl​icationWit​hMCROption​s not working in Excel VBA

Hello Experts, I compiled an excel add-in using the Matlab R2014b version. As part of the package it created a bas file which I can use in my Excel VBA code to initialize the MCR and call the object. Since there are no screens involved I wanted to disable to JVM. Hence I compiled with the -R -nojvm option. Now when I try to run the code it fails at the statement Call MCLUtil.MWInitApplicationWithMCROptions(Application, mcrOptions) The error says that the MCR cannot be initialized. If I remove the options parameter then it initializes correctly. But I am using the code generated by the matlab compiler. Am I doing anything wrong. Kindly help. I appreciate it. If MCLUtil Is Nothing Then Set MCLUtil = CreateObject("MWComUtil.MWUtil8.4") End If Dim mcrOptions(1 To 1) As String mcrOptions(1) = "-R -nojvm" Call MCLUtil.MWInitApplicationWithMCROptions(Application, mcrOptions)
Thank you very much. Swapnil

답변 (1개)

Swapnil
Swapnil 2015년 3월 19일
if true
% If MCLUtil Is Nothing Then
Set MCLUtil = CreateObject("MWComUtil.MWUtil8.4")
End If
Dim mcrOptions(1 To 1) As String
mcrOptions(1) = "-R -nojvm"
Call MCLUtil.MWInitApplicationWithMCROptions(Application, mcrOptions)
end

카테고리

도움말 센터File Exchange에서 Data Export to MATLAB에 대해 자세히 알아보기

질문:

2015년 3월 19일

답변:

2015년 3월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by