Option Explicit
Public WithEvents packageProgress As DTS.Package2
Private Sub packageProgress_OnError(ByVal EventSource As String, ByVal ErrorCode As Long, ByVal Source As String, ByVal Description As String, ByVal HelpFile As String, ByVal HelpContext As Long, ByVal IDofInterfaceWithError As String, pbCancel As Boolean)
'
Debug.Print "An Error - " & ErrorCode
End Sub
Private Sub packageProgress_OnFinish(ByVal EventSource As String)
'
Debug.Print "Finishing - " & EventSource
End Sub
Private Sub packageProgress_OnProgress(ByVal EventSource As String, ByVal ProgressDescription As String, ByVal PercentComplete As Long, ByVal ProgressCountLow As Long, ByVal ProgressCountHigh As Long)
Debug.Print ProgressDescription & " " & CStr(PercentComplete) & " " & CStr(ProgressCountLow) & " " & CStr(ProgressCountHigh)
End Sub
Private Sub packageProgress_OnQueryCancel(ByVal EventSource As String, pbCancel As Boolean)
'
Debug.Print "OnQueryCancel - " & EventSource & " pbCancel = " & CStr(pbCancel)
'you will need a user interface with a global cancel variable if you wish the user to cancel the process
'otherwise you must set this as DTS will change this to true every second time it fires this event
pbCancel = False
End Sub
Private Sub packageProgress_OnStart(ByVal EventSource As String)
'
Debug.Print "Starting - " & EventSource
End Sub