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: 1
Default Setting timeout for Web queries

Hello,
I'm trying to get data from a web page through a web query in a macro.
The problem is that, sometimes, this web page takes way too long to
load, or may never appear (the server is not good). In Internet
Explorer, if I go that page and notice it's taking too long, I just hit
Refresh and the page usually appears in less than 2 seconds. If I don't
hit Refresh, the page might never appear.

Now I'm trying to do the same thing in a macro. I want Excel to run the
following query, but if after 5 seconds the data is not there, I want
it to stop and try again. I've tried using .QueryTimeout, but it
doesn't seem to accept that command (although it's in the help file)

cn = "url; http://something.com"
Set table_1 = Page_1.QueryTables.Add(Connection:=cn,
Destination:=Page_1.Cells(1, 1))

With table_1
..BackgroundQuery = True
..Refresh
End With

Thanks a lot in advance,
Martín


---
Message posted from http://www.ExcelForum.com/

 
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
MsgBox with timeout pgarcia Excel Discussion (Misc queries) 1 March 8th 07 10:06 PM
TImeIn-TimeOut-TimeIn-TimeOut-HoursWorked ChefBoiRD Excel Worksheet Functions 3 September 20th 05 10:01 AM
Timein-Timeout Jim Stewart Excel Programming 2 September 1st 03 09:49 AM
setting timeout for opening web files Robbie Geary Excel Programming 0 August 11th 03 10:03 AM
Web query timeout Karyn Mak Excel Programming 0 July 16th 03 11:48 AM


All times are GMT +1. The time now is 09:41 PM.

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"