PC Review


Reply
Thread Tools Rate Thread

Copy Sync with Shell

 
 
MTechG
Guest
Posts: n/a
 
      7th Jul 2008
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
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      7th Jul 2008
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy to c:\users\default - user shell folder autocad 2008 isssue Phantom Lord Windows Vista General Discussion 2 17th Oct 2007 03:29 PM
How do I copy all text files into one??? eg; Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx") Hexman Microsoft VB .NET 2 1st Aug 2006 09:09 AM
Explorer.exe shuts down during file copy and shell restarts =?Utf-8?B?Um9uIEJlbm5ldHQ=?= Windows XP Help 0 13th Aug 2005 03:11 AM
How to copy file when I do a sync? Keith Smith Microsoft Dot NET Compact Framework 0 14th May 2005 03:52 AM
Save and Copy filenames Shell Extension Eric D Freeware 6 5th Sep 2003 02:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:56 PM.