run VBA MACRO in MATLAB

HI, I want to run the VBA code(some small macro) from matlab.I can do that by invoking the Excel(using actxserver) and run the macro in the excel but my point is that i want to run the VBA macro directly from matlab without opening any third application
I hope i stated clearly my problem :)

回答(1 个)

Walter Roberson
Walter Roberson 2011-12-13

0 个投票

VBA is built in to Excel so a third application is not being invoked.
VBA is only available as built in to applications; it is not available by itself. This is by design, as VBA is "Visual Basic for Applications".

3 个评论

so as far as i understand, I must invoke the Excel to run the VBA script and there is no other way by using which i may reduce some time and CPU load?
is it right?
As long its a Macro in EXCEL you have to start EXCEL to run it. What does this Macro do? Maybe you can convert it to MATLAB code? Or maybe some VB script? You can run a VBS script without opening a 3rd application since this is a Windows built in feature.
If it is VBA then unless you can rewrite it, you must start _some_ application in order to execute it, as VBA is, by definition, something that is built in to applications.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by