Execute SQL Packages

Posted on 2003-03-21
Medium Priority
Last Modified: 2013-11-30

I´m trying to find a way to execute a DTS Package using VBA in Excel.
Question by:Claudia_V
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 34

Expert Comment

ID: 8182713
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.


Author Comment

ID: 8193872
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

LVL 34

Accepted Solution

arbert earned 150 total points
ID: 8195189
Yes, like I said in my first post--you need a reference to
Microsoft DTS Custom Tasks Object and the Microsoft DTSPackage object library.  

In your VBA Editor, go to the tools menu, select references, and then select the Microsoft DTS libraries that I listed above.


Author Comment

ID: 8195304

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

Expert Comment

ID: 8195379

have fun

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

743 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