Close Command after running MATLAB function in EXCEL VBA
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
I'm finding a close command after running a M file in EXCEL VBA.
Because I got a alert message like "Microsoft Office Excel is waiting for another application to complete on OLE action" after running a M file in Excel VBA.
Do you have any idea about the close MATLAB application command in VBA?
Dim MatLab As Object
Dim Result As String
Set MatLab = CreateObject("MatLab.desktop.Application")
Result = MatLab.Execute("cd('C:\Documents and Settings\M02043\Desktop\MATLAB Interface Test')")
Result = MatLab.Execute("f_ann")
End Sub
Thanks a lot in advance.
댓글 수: 1
Kaustubha Govind
2011년 7월 19일
Try
MatLab.Execute("quit")
I don't know if this will fix the error though.
답변 (3개)
Chirag Gupta
2011년 7월 19일
Kaustubha's suggestion looks good to me. Is your routine f_ann finished when you try and exit?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Export to MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!