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
How can I do that?
Thanks for your time! :)