Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Locating Query Errors in a Sea of Queries

Greetings! I have an Excel spreadsheet with lots of stock/option quote
data on a "quotes" sheet. I'm getting an "Invalid web query" error
when I do a "refresh all", but I can't locate the offending query!
Anybody know how to track it down? I've tried going through each query
one by one, but do not get the error that way. I'm thinking there's an
old (hidden?) query left around somewhere, but I can't find it.

Thanks!

Scott <<

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Locating Query Errors in a Sea of Queries

sub ShowQueries()
Dim sh1 as Worksheet, sh as Worksheet
Dim rw as Long, qt as QueryTable
On Error Resume next
Application.displayAlerts = False
Worksheets("QueryList").Delete
Application.DisplayAlerts = True
On Error goto 0
worksheets.add After:=Worksheets(worksheets.count)
Activesheet.Name = "QueryList"
set sh1 = Activesheet
rw = 0
for each sh in worksheets
if sh.Name < "QueryList" then
if sh.QueryTables.count 0 then
rw = rw + 1
sh1.Cells(rw,1).Value = sh.name
for each qt in sh.QueryTables
rw = rw + 1
sh1.Cells(rw,2).value = qt.SQL
sh1.Cells(rw,3).Value = qt.Connection
sh1.Cells(rw,4).Value = qt.Destination.Address(0,0,xlA1,True)
'qt.Refresh Backgroundquery:=False
rw = rw + 1
next
end if
end if
Next
End Sub

Might be helpful.

--
Regards,
Tom Ogilvy


"Scott" wrote in message
oups.com...
Greetings! I have an Excel spreadsheet with lots of stock/option quote
data on a "quotes" sheet. I'm getting an "Invalid web query" error
when I do a "refresh all", but I can't locate the offending query!
Anybody know how to track it down? I've tried going through each query
one by one, but do not get the error that way. I'm thinking there's an
old (hidden?) query left around somewhere, but I can't find it.

Thanks!

Scott <<



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
MS query--can it handle parameter queries from Access? Dave F Excel Discussion (Misc queries) 0 September 13th 06 02:41 PM
Locating Invalid Web Query Data Scott Excel Programming 0 February 7th 06 12:14 PM
Web Query Errors Ramthebuffs[_16_] Excel Programming 2 November 20th 05 02:29 AM
Running multiple queries in Microsoft Query in Excel [email protected] Excel Programming 3 April 26th 05 09:58 PM
Font errors when performing multiple web queries Stiv[_2_] Excel Programming 1 September 16th 04 09:28 PM


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