Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default where do my SQL querries get stored in the MS query tool in excel?

I am not sure what happened but when I right click on my tables to edit my
querry I am getting a bunch of errors and I cannot open the MS query tool.

Where are my SQL queries stored? (please for the love of god tell me in the
spreadsheet somewhere)
--
Neall
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default where do my SQL querries get stored in the MS query tool in excel?

Look up the VBA Help for the QueryTable object and CommandText

Sub ListQTs()
Dim ws As Worksheet, qt As QueryTable
On Error Resume Next ' ignore errors getting SQL CommandText
For Each ws In ActiveWorkbook.Worksheets
For Each qt In ws.QueryTables
Debug.Print qt.Name, qt.Connection
Debug.Print vbTab, qt.CommandText
Next
Next
End Sub

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
Stumped on establishing web querries on MS Excel Chris Excel Discussion (Misc queries) 9 August 16th 09 04:23 PM
ADO: run a stored Access query from Excel mark Excel Programming 1 June 14th 07 01:53 PM
How to execute parametrised stored procedure from MS query? Otto4444 Excel Programming 2 September 28th 06 10:51 PM
calling a stored access query from excel vba Travis Excel Programming 1 April 25th 05 09:11 PM
Problem Code: Retrieving Stored Access 03 Query Bettergains Excel Discussion (Misc queries) 2 December 7th 04 04:11 PM


All times are GMT +1. The time now is 04:50 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"