daino 2 Light Poster

I'm trying to call an executable from my VBA code so that I can run it from that code. I can do this using the 'Shell' directive but what I can't do is receive a return value (the output) from that exe file.

I'm not sure where to post this as it could slot into any category. In my C++ code I wrote for the executable, the vba code or some other windows script hosting inclusion in my VBA.

If I was to receive a value back to my,, say,, excel workbook which contained that vba code calling the exe file then I would assume that I would need to use a windows script hosting function in my VBA code. I know how to include the windows script host object model but which function to I use to receive a string return value from my exe program?

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.