I found the following codes, but something missing... I don't have the DTS choice in my list of object when I declare a variable using DIM obj AS...
What I have to do to get DTS object?
---------------------------
The following code example shows a DTS package using an ExecutePackageTask, through the Execute and UnInitialize methods:
Private WithEvents mobjPkgEvents As DTS.Package
. . .
Private Sub RunPackage()
'Run the package stored in file C:\DTS_UE\TestPkg\VarPubsFields.dts.
Dim objPackage As DTS.Package2
Dim objStep As DTS.Step
Dim objTask As DTS.Task
Dim objExecPkg As DTS.ExecutePackageTask
On Error GoTo PackageError
Set objPackage = New DTS.Package
Set mobjPkgEvents = objPackage
objPackage.FailOnError = True