View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Copy Sync with Shell

I bet you haven't seen anything because it would depend on what program you're
launching.

Maybe you could have that program write to a text file and then have your VBA
code open that text file and read what it wants.

If you know that the other program works quickly, you could
shell
wait 5 seconds (or whatever you think is appropriate)
open the text file
read the data.

If you don't know how long it'll take to do the program in the shell, then there
are other ways to wait.

http://support.microsoft.com/?kbid=214248
XL2000: How to Force Macro Code to Wait for Outside Procedure
or

Here's a link to a nice ShellAndWait function:
http://groups.google.com/groups?thre...%40tkmsftngp03

==========
All this could be moot if you don't have some control over how the other program
can share the results.

MTechG wrote:

I can launch a cmd with a command from vba but would I'd like to do is get
the results from the shell session back to Excel. I haven't seen anything on
this.

TIA


--

Dave Peterson