Link to home
Start Free TrialLog in
Avatar of Claudia_V
Claudia_V

asked on

Execute SQL Packages

Hello,

I´m trying to find a way to execute a DTS Package using VBA in Excel.
Avatar of arbert
arbert

Add a reference into your VBA program for the Microsoft DTS Custom Tasks Object and the Microsoft DTSPackage object library.

You can then utilize all the properties and methods that are availabe to the DTS object model.

Brett
Avatar of Claudia_V

ASKER

Hello, Thanks for the answer. I have recently seen an example of what you are sugesting, but I can´t seem to make it work because I think I don´t have a certain library reference which I need, because he doesn´t recognize the objects DTS when I declare the variables.

Dim objPackage      As DTS.Package2
Dim objStep         As DTS.Step
Dim objTask         As DTS.Task
Dim objExecPkg      As DTS.ExecutePackageTask


These are all the objects he doesn´t recognize. Do tou perhaps know which is the library I´m missing????

Once again thanks for the help

ASKER CERTIFIED SOLUTION
Avatar of arbert
arbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Sorry didn´t get it the first time around. It works like a charm, thanks....
Great!

have fun
Brett