I can do basic things like plot graphs, create variables using this script but as soon as I tell it to run a script it freezes and excel starts giving this message:
'Microsoft Excel is waiting for another programme to complete an OLE Command'
This is the script I used:
Dim MatLab As Object
'Create the Matlab Object
Set MatLab = CreateObject("Matlab.Application")
Result = MatLab.Execute("cd('\\Directory')")
Result = MatLab.Execute("x = -pi:.1:pi; y = sin(x); plot(x,y)")