K
kilter
I have an excel 2010 workbook located in a network directory and
a .exe program in the same directory, along with a number of its
dependencies (data files). I'd like to run the exe program from within
a VBA subroutine using a shell command. Current code is as follows
This fails as I need to change directories to the network drive and
set the current working directory to ActiveWorkbook.Path, so the shell
command can find the exe file which in turn can find its dependencies.
Not sure how to do this in a way the shell command understands.
Any suggestions gratefully received.
a .exe program in the same directory, along with a number of its
dependencies (data files). I'd like to run the exe program from within
a VBA subroutine using a shell command. Current code is as follows
Code:
Sub RunModel()
ReturnValue = Shell("model.exe")
MsgBox ReturnValue
End Sub
This fails as I need to change directories to the network drive and
set the current working directory to ActiveWorkbook.Path, so the shell
command can find the exe file which in turn can find its dependencies.
Not sure how to do this in a way the shell command understands.
Any suggestions gratefully received.