Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Queries created by MS Query not in QueryTables collection

On my spreadsheet I have created a table using an MS Query query, creating
the table via File/Return data to Excel. This creates a table in my worksheet
and a connection that shows up in my existing connections dialog. I have no
problems refreshing the table using the refresh button.

However, in VBA this table does not show up in the Querytables collection
for that worksheet when I print out the names of the items in the collection
in the immediate window. Meanwhile, a connection created using the From Text
button on the Data tab does show up.

Does anyone have any insight as to why the MS Query does not show up, and
how I can get it to show up? Otherwise, as far as I know, there is no way to
manipulate it or refresh it via VBA.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Queries created by MS Query not in QueryTables collection


How are you referening the collection? Are you starting the indexing at
zero?


Usually I get all the queries on the worksheet using the following

for each qry in sheets("sheet1").queries
msgbox("Query Name : " & qry.name)
next qry


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=183104

Microsoft Office Help

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
viewing newly created access queries in excel via msquery CWCPGCFin Excel Discussion (Misc queries) 0 September 29th 06 10:32 AM
Works in Microsoft Query, but not with QueryTables [email protected] Excel Programming 2 July 24th 06 02:17 PM
MS Query imbedded Queries Dave W.[_2_] Excel Programming 0 February 15th 06 02:29 AM
Locating Query Errors in a Sea of Queries Scott Excel Programming 1 February 13th 06 12:31 PM
External data queries within applcation collection Andy S Excel Programming 2 November 24th 03 08:44 PM


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