Hello Ahmed,
I confirm your script (the mmult_test() function) works as expected on my side. I tried on two Windows 11 systems. On a corporate PC with strict security rules, the Excel will not let the script to launch the FreeMASTER processes, so I had to run them manually first:
pcmaster /sharex TRQ
pcmaster /sharex SPD
Then the script was able to get access to running instances. Followed by a message:

...which is obvious as I have an empty project in the TRQ instance.
In the 2nd experiment using my home PC, the Excel was able to launch and control the instances. I'm really not sure what can be blocking the access on your side. Can you try the same on a different PC?
Regards,
Michal