Calling executables from VB

G

Guest

What is the best way to exchange data between an executable and VB?

For example, I have an executable (Test.exe) that takes two input variables
and then returns their sum. I use the Shell function:

RetVal = Shell(“C:\Test.exe 3 4â€)

Test.exe returns 7 (3+4) but this value is not passed to VB (The value
returned by Shell is a Task ID number). How do I get the returned value of
Test.exe in VB? Is there a better way to exchange data than using the Shell
function?

The big picture objective here is to be able write computationally intensive
routines in C and call them from within Excel VB.


Tx,

Randall
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top