LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Dynamic Web Queries

Hello,

I am attempting to use the below code to run some web queries via my macro.
I am often times getting an Application defined or Object defined error on
the .Refresh BackgroundQuery part. I have about 5 of these queries in my
macro and the error can happen in any of them and there does not appear to
be a pattern. I dont know if the program is having problems connecting to
the online information or what might be causing this, but I have had
multiple web queries run through a macro and have never received this error.
I tried tossing some Application.wait code in there but that did not seem to
help. Does anyone have any suggestions on this?

Also, as I run this macro over and over (I need to run it each day to gather
data) "ExternalData_x" items are being created with respect to these web
queries. To explain this further you can see this under the Insert - Name -
Define menu. I can delete these manually but would prefer that they arent
saved at all in the spreadsheet if this is at all detrimental. I have the
macro deleting the QueryTables with Selection.QueryTable.Delete, but these
ExternalData_x. Any suggestions on this?

Thanks

Matt

With Sheets("RawData").QueryTables.Add(Connection:="URL ;" & url, _
Destination:=Sheets("RawData").Range("b2"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = False
End With


 
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
Dynamic pivot table linked to dynamic excel spreadsheets FErd Excel Worksheet Functions 0 April 29th 10 10:44 PM
Dynamic chart pasted to a new workbook in report can't be dynamic Piotr (Peter)[_2_] Charts and Charting in Excel 2 August 6th 08 05:15 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Dynamic Web Queries Chuck Taylor Excel Programming 1 January 27th 04 04:27 AM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"