I don't know if "shell" can be used to do this but I want to run an external .exe file that sends text output to the screen/standard out. Is there a way to run an external program and capture the output into a local variable within VBA? For example, say have a program called "add.exe" that takes two numbers as input and outputs the sum. Thus, if I were to run the program from a DOS shell I would type something like:
sum.exe 5 10
The result would output: 15
I want to be able to issue that command and capture the value "15" in a local variable within my VBA program. Since "shell" is a sub I figure there is no way to do it ( I apologize for not having any documentation for shell in front of me.)
Help is appreciated.
Thanks,
Greg
sum.exe 5 10
The result would output: 15
I want to be able to issue that command and capture the value "15" in a local variable within my VBA program. Since "shell" is a sub I figure there is no way to do it ( I apologize for not having any documentation for shell in front of me.)
Help is appreciated.
Thanks,
Greg