Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel ODBC Data Connection

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Excel ODBC Data Connection

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

"jerm" wrote in message
ups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel ODBC Data Connection

thanks :)

jer

NickHK wrote:
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

"jerm" wrote in message
ups.com...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel connection to ODBC database Poppe Excel Discussion (Misc queries) 8 April 24th 09 06:16 AM
Changing and Adding data through ODBC connection Bob Excel Discussion (Misc queries) 0 November 3rd 08 05:04 PM
ODBC connection string Excel to AS/400 [email protected] Excel Programming 4 September 19th 06 09:57 PM
How to Switch the ODBC connection in Excel Pete Petersen Excel Programming 1 June 10th 05 07:45 PM
Excel / Access ODBC connection Rasmus[_3_] Excel Programming 2 April 11th 05 12:39 AM


All times are GMT +1. The time now is 09:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"