Forum Discussion

Gilgamesh1964's avatar
Gilgamesh1964
Brass Contributor
May 25, 2021

Can I get the results of a Shell command launched in VBA

Hello,

I have a command line constructed in VBA which I send to the Shell command.

The command outputs its results to StdOut.

Is there anyway of accessing this StdOut results as a string back in my VBA after the Shell command completes?

 

I know I could construct the command line to redirect the results to a file and read the file but I was hoping that there was a smarter way of getting the results.

 

I am doing this in Excel 2010 on Windows 10.

 

Thank You

5 Replies

Resources