How to suppress opening of command window?

4 vues (au cours des 30 derniers jours)
s lahiri
s lahiri le 28 Fév 2021
Réponse apportée : dpb le 28 Fév 2021
I am opening the matlab application from vba by following vba code
Public Sub StartExeWithArgument()
Application.ScreenUpdating = False
fileToRun = "C:\Users\Sandip\Desktop\exe project\mainfile"
matlabCommand = "matlab -nosplash -nodesktop -r "" run('" & fileToRun & "');warning off;exit;"" "
Shell (matlabCommand)
Application.ScreenUpdating = True
End Sub
Program is running fine, but the command windown is popping up everytime I run the program.
How to suppress opening of command window?

Réponses (1)

dpb
dpb le 28 Fév 2021
Use the -batch option
See <matlabwindows> for all startup options (windows, there are other links for other OS)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by