Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Excel ODBC Data Connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jerm - 18 Jan 2007 22:47 GMT
Hi, when I import external data into excel using the Tools > Import
External Data > .... function where does excel store this connection?
I know it's there because i can right click and 'Refresh Data".....

I would like to access this connection some how but am not sure as how
I go about doing so...

Regards,
jerm
NickHK - 19 Jan 2007 08:22 GMT
It creates a query table object:

Dim WS As Worksheet
Dim QT As QueryTable
Dim QTCount As Long

For Each WS In ThisWorkbook.Worksheets
   For Each QT In WS.QueryTables
       Debug.Print QT.Parent, QT.CommandText
       QTCount = QTCount + 1
   Next
Next

MsgBox "There are " & QTCount & " query tables in this workbook."

NickHK

> Hi, when I import external data into excel using the Tools > Import
> External Data > .... function where does excel store this connection?
[quoted text clipped - 5 lines]
> Regards,
> jerm
jerm - 19 Jan 2007 15:41 GMT
thanks :)

jer

> It creates a query table object:
>
[quoted text clipped - 22 lines]
> > Regards,
> > jerm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.