My mistake, it should have been a Do...Loop, not an If..Then

I have 1 main (global) module, that contains Sub Main, then 5 individual import modules that execute my DTS packages to import 5 different text files.

The DoStuff module is in on of my import modules and is called from the main module.
The ExecuteBatchFile procedure is contained in the main module, so the processes.HasExited property can be accessed by the import modules. Because each import module calls a different batch to execute the DTSRun.exe command to run a DTS package.

It basically looks like this (extremely scaled down)

Main Module
VB Code:
  1. Public mobjDTSProcess As Process
  2.  
  3. Public Sub Main()
  4.    Call DoStuff()
  5. End Sub
  6.  
  7. Public Sub ExecuteBatchFile(ByVal strFilePath As String)
  8.    Try
  9.       mobjDTSProcess = Process.Start(strFilePath)
  10.    Catch ex As Exception
  11.       'Do something
  12.    End Try
  13. End Sub

Import1 Module
VB Code:
  1. Public mintI As Integer
  2.  
  3. Public Sub DoStuff()
  4.    ExecuteBatchFile("C:\Test.bat")
  5.  
  6.    Do until mobjDTSProcess.HasExited = True OrElse mintI = 4
  7.       NotifyUser("Waiting on DTS to complete.")
  8.       Thread.Sleep(2000)
  9.       mintI += 1
  10.    Loop
  11.  
  12.    If mintI = 4 Then
  13.       'The DTS process failed
  14.       Application.Exit()
  15.    Else
  16.       'The DTS process succeeded
  17.       'Do more stuff
  18.    End If
  19. End Sub