View Single Post
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

The Shell function does not provide for passing parameters to the called
program (see Help). I suppose you could write out your variables to a file
or to the registry. Similarly on return.

--
Jim
"ellis kurland" wrote in message
...
|I have an excel spreadsheet and call a C++ program from a VBA macro using
| the command below. (I am not using visual C++ but a command line driven
| version, Borland C++ compiler)
|
| retval = Shell ("c:\options\options1.exe", vbNormalFocus)
|
|
| What I want to be able to do is to pass some of the values in my excel
| spreadhseet to the C++ program when calling it. There are 5
| variables(spreadsheet cells) whose numerical values I want to pass across
to
| the program.
|
| Once the C++ program has run I want to put a value that it caluculates in
to
| a cell in my excel spreadsheet.
|
| Any help much appreciated please.
|
| Many thanks
|
|