Only one problem: the SSIS visual studio editor does not have a COM tab it only has a .Net tab. I'm not sure why this is.
I see that .Net has the CreateObject statement. That would probably allow me to get around not having a 'COM' tab.
So if I understand correctly, the Imports keyword is a way of making a particular namespace 'pre-selected' in the editor, kind of similiar to 'With' in VB6?. You always need to add the reference under the menu, the imports is a just a way of making your code neat and making the namespace 'pre existing'?





by: webtubbsPosted on 2009-05-06 at 23:52:36ID: 24322931
To add a reference, you will need to look under the "COM" tab of the references dialog. It will be called "Microsoft Excel XX.0 Object Library", where "XX" is the version of Excel.
xcel.Appli cation
xcel
A reference is required before it can be "Imported". The Imports keyword allows a namespace to be accessed directly, which will mean that you can declare objects like this....
Dim xlApp As Application
...instead of like this....
Dim xlApp As Microsoft.Office.Interop.E
A side note - when I import Excel, I use this construct....
Imports Excel = Microsoft.Office.Interop.E
...which allows me to declare objects in such a way that I can easily see what namespace they are from....
Dim xlApp As Excel.Application
Wayne