Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old September 30th 03, 02:21 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2003
Posts: 2,824
Default How can you wait for the SHELL command to terminate ?

MS has a solution at:

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

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

jmoffat wrote:

As the help file points out:

"Note: By default, the Shell function runs other programs
asynchronously. This means that a program started with Shell might not
finish executing before the statements following the Shell function are
executed."

This implies there is a way to cause execution to halt until the shell
command is completed.

Has anyone found a way to do this ?

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


--

Dave Peterson


  #2   Report Post  
Old October 1st 03, 09:10 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Oct 2003
Posts: 1
Default How can you wait for the SHELL command to terminate ?

Thanks a lot Dave - this is exactly what I was looking for.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use the "shell" command? Tom Excel Discussion (Misc queries) 11 April 27th 10 12:52 AM
sendkeys(keys,wait) how do I use wait MM Excel Discussion (Misc queries) 1 February 11th 09 03:47 PM
terminate a form tkaplan Excel Discussion (Misc queries) 5 October 24th 05 01:14 PM
Copying a file with VBA (or with a SHELL command) Franck V. Excel Programming 1 September 15th 03 07:46 PM
Can't terminate the excel instance from VB Gerhard[_2_] Excel Programming 1 July 16th 03 11:06 AM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017