So I created an .exe file (tlsolver.exe) to run using VBA (TLSolver.xlsm). When I launch the .exe, it runs some calculations, spits out a csv file, and then I use VBA to copy that data onto my excel sheet.
This is the VBA code I am using:
Public Sub StartExeWithArgument()
Dim strProgramName As String
ActiveWorkbook.Save
strProgramName = "C:\Users\My.Name\Desktop\Python\Tagless\tlsolver.exe"
Call Shell("""" & strProgramName & """", vbNormalFocus)
End Sub
When I run the macro, the console window pops up as it should and then quickly closes. I managed to see this error before it closes:
IOError: [Errno 2] No such file or directory: 'TLSolver.xlsm'
I know that the .exe works perfectly fine when I doubleclick on the file regularly, so I am inclined to think that I am messing up something silly in the VBA.
Any help appreciated!
Edit: I know the sub is labeled as StartExeWithArgument, but there is no argument required, simply click and run.