I have tested these functions in an excel VBA with STAAD.Pro SS6 (build 20.07.11.50) version. It works properly. I have used the following code--
Set OpenSTAADObject = GetObject(, "StaadPro.OpenSTAAD")
OpenSTAADObject.CloseSTAADFile
OpenSTAADObject.Quit
I think you should check whether the syntax is properly specified in the Matlab. Also which version of STAAD.Pro are you using?