I want to run a MATLAB script using VBA. I tried running the following code
Set Matlab = CreateObject("Matlab.Application")
result = Matlab.Execute("path to the script")
MsgBox (result)
But it doesn't return anything in the msgbox, nor was the MATLAB workspace modified. How can I know it ran the script?
If you want to know whether the script ran, you can have it create an empty file with a timestamp.
If you see this file after running the VBA command, it means the script ran.
The reason you don't see changes in the workspace is probably because it opens a new MATLAB instance to run your script in.