D
D.riggins
I am trying to run a batch file from Excell 2003 using the Shell function in
VBA and I can’t seem to get it to work. The code is like this:
RetVal = Shell(BatFilePath, vbNormalFocus)
Where BatFilePath is a string variable with the full path of the batch file
(e.g., D:\...\Batchfile.bat)
The line executes – I get a value in the RetVal variable and I see a brief
flash of the command prompt window, but I do not see the file that the batch
file is supposed to produce. A search of my hard drives indicates that the
results have not been created in some unexpected location.
The batch file works properly when run manually.
VBA and I can’t seem to get it to work. The code is like this:
RetVal = Shell(BatFilePath, vbNormalFocus)
Where BatFilePath is a string variable with the full path of the batch file
(e.g., D:\...\Batchfile.bat)
The line executes – I get a value in the RetVal variable and I see a brief
flash of the command prompt window, but I do not see the file that the batch
file is supposed to produce. A search of my hard drives indicates that the
results have not been created in some unexpected location.
The batch file works properly when run manually.