Solved

Is there any way to make DOS Shell Script to wait on VB program to complete?

Posted on 2003-11-12
3
462 Views
Last Modified: 2012-08-14
Thanks in advance,
-Al
0
Comment
Question by:AlexF777
3 Comments
 
LVL 16

Assisted Solution

by:Richie_Simonetti
Richie_Simonetti earned 50 total points
Comment Utility
0
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 50 total points
Comment Utility
Try this


Option Explicit

Dim WshShell
Dim ReturnCode

'Syntax: Return Code = WshShell.Run (strCommand, [intWindowStyle], [blnWaitOnReturn])

'This example will execute example.exe and wait until it is done
Set WshShell = CreateObject("Wscript.shell")
ReturnCode = WshShell.Run("calc.EXE", , True)
msgbox "hello"
Set WshShell = Nothing
0
 
LVL 42

Accepted Solution

by:
frodoman earned 150 total points
Comment Utility
You can also call a .bat file that contains:

START /W MyVBProgram.Exe
@ECHO This won't execute until MyVBProgram has completed.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now