MATLAB Answers

0

Call a VBA object in Matlab with Activex server.

Asked by Ajpaezm on 15 Apr 2017
Hello,
I already know we can call functions/subs from a VBA module within Matlab using activex server with this command: Excel.Application.Run('function_sub',var1,var2,...,varn).
Now I want to know if that's possible for Microsoft Excel Objects (the VBA code that's contained in the sheets, not a module).
Suppose I want to run the following code contained in Sheet1 (see image above):
Function sum(val1 As Single, val2 As Single) As Single
sum = val1 + val2
End Function
How can I do that?
Thanks for your time! :)

  0 Comments

Sign in to comment.

0 Answers