Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Find the contents of a Connection property of the QueryTable objec

Greetings,

How can I determine the contents of Connection property of the QueryTable
object in a Worksheet and if there are several queries in the same Worksheet?.

Thank you in advance for your support.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Find the contents of a Connection property of the QueryTable objec

hi,
finding querys:
query tables show up as range names. so goto
Insertnamesdefine
if querytable are present, they will show up here. click
on one and the range will appear in the box at the bottom.
or you can use the navigator. in the upper left of the
sheet, click the down arrow. the query range should be
listed. click on one and it will take you to the query
table. you must do this for each sheet.
connection Property:
click inside the query range and goto
DateGet external Date edit query.
(if the wizard comes up, toggle to the last page and click
view data or edit query in Microsoft query.)
when microsoft query comes up, click viewsql.
this will be the connection.
Regards
Frank
-----Original Message-----
Greetings,

How can I determine the contents of Connection property

of the QueryTable
object in a Worksheet and if there are several queries in

the same Worksheet?.

Thank you in advance for your support.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Find the contents of a Connection property of the QueryTable objec

Frank,

Thank you for the prompt response and the information you provided. I was
hopping to get more information on how to accomplish this task
programmatically. I have 480 Queries that I must modify regularly, which
becomes a cumbersome task.



"Frank Stone" wrote:

hi,
finding querys:
query tables show up as range names. so goto
Insertnamesdefine
if querytable are present, they will show up here. click
on one and the range will appear in the box at the bottom.
or you can use the navigator. in the upper left of the
sheet, click the down arrow. the query range should be
listed. click on one and it will take you to the query
table. you must do this for each sheet.
connection Property:
click inside the query range and goto
DateGet external Date edit query.
(if the wizard comes up, toggle to the last page and click
view data or edit query in Microsoft query.)
when microsoft query comes up, click viewsql.
this will be the connection.
Regards
Frank
-----Original Message-----
Greetings,

How can I determine the contents of Connection property

of the QueryTable
object in a Worksheet and if there are several queries in

the same Worksheet?.

Thank you in advance for your support.
.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Find the contents of a Connection property of the QueryTable objec

Dim ws As Worksheet
Dim qtbl As QueryTable

For Each ws In ActiveWorkbook.Worksheets
For Each qtbl In ws.QueryTables
With qtbl
Msgbox .Connection
End With
Next qtbl
Next ws

--
Dianne Butterworth

SPYREN wrote:
Greetings,

How can I determine the contents of Connection property of the
QueryTable object in a Worksheet and if there are several queries in
the same Worksheet?.

Thank you in advance for your support.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Find the contents of a Connection property of the QueryTable o

Thank you Dianne,
This solution worked fine!.

Thank you again for your response.




"Dianne Butterworth" wrote:

Dim ws As Worksheet
Dim qtbl As QueryTable

For Each ws In ActiveWorkbook.Worksheets
For Each qtbl In ws.QueryTables
With qtbl
Msgbox .Connection
End With
Next qtbl
Next ws

--
Dianne Butterworth

SPYREN wrote:
Greetings,

How can I determine the contents of Connection property of the
QueryTable object in a Worksheet and if there are several queries in
the same Worksheet?.

Thank you in advance for your support.




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 2007 crashes after viewing property sheet in Data Connection Fritz New Users to Excel 14 April 3rd 12 09:23 AM
Excel Connection to SQL 2007 can't find stored procedure message SaveTheMonarchButterflies Excel Discussion (Misc queries) 0 November 10th 08 03:58 PM
always recheck data connection library for latest connection strin FurmanGG Excel Discussion (Misc queries) 0 September 14th 07 04:48 PM
Find OnAction property Kemosabe Excel Programming 1 November 21st 03 03:34 PM
How to check if SHEET has QUERYTABLE property ? steve Excel Programming 1 August 22nd 03 06:19 PM


All times are GMT +1. The time now is 09:44 AM.

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"