'Running Matlab application (.exe) from VBA (process does not finish)

I compiled a MatLab code to executable application to be ran from the VBA. When I run the application outside the VBA, everything is OK, but when I execute it through the VBA, it seems the last part of the MatLab code (which is data export) doesn't execute. Anyone had a similar experience or something that might help please?

Below is the basic VBA code I am using to run the application

Sub Run_EXE()

CurrentPath = ThisWorkbook.Path
Dim varProc As Variant
Dim strProgramName As String
    strProgramName = CurrentPath & "\Models\Master_Model_T1.exe"
    
varProc = Shell(strProgramName, 1)

End Sub


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source