View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Refreshing Query Tables


"Tom Ogilvy" wrote in message
...
Suspect this is in a sheet module in which case, the unqualified

references
will remain pointed at the sheet containing the module rather than the
activesheet (which is your intent). The revision below should work if my
assumption is correct.

For Each ws In Worksheets
' ws.Activate
For Each ws.query In QueryTables
ws.query.Refresh BackgroundQuery:=False
Next
Next


For Each query In ws.QueryTables
query.Refresh False
Next query

?

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com