Web Query Query

TiTuS

Board Regular
Joined
Nov 10, 2004
Messages
238
Hi,
Just a problem im having is i have lots of web querys in my sheet. alot of the time i get the error saying no data returned when they refresh i was wondering if the following code could be changed to work with a web query and if it would delay the error coming up till data is recived? or even better does anyone have a code to cancel out that error but still have the query refresh till data is recieved, the reason i need this error gone is i have a query that refreshes every second to trace the exact time data changes on a site. so if that error keeps coming up it defeats the pupose of been able to leave the sheet to run itself

code:
--------------------------------------------------------------------------------

ActiveWorkBook.RefreshAll
With Worksheets(1).QueryTables(1)
Do While .Refreshing = True
Loop
End With
ExistFault.Show
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
See the VBE help file on the Refresh Method. You want to set the BackgroundQuery argument to False, e.g.,

Sheets(1).QueryTables(1).Refresh BackgroundQuery:=False
MsgBox "Hello World Wide Web!!"
 
Upvote 0

TiTuS

Board Regular
Joined
Nov 10, 2004
Messages
238
This did not work in eliminating the error, anyone else able to help?
This is a problem that i know alot of people have found with web query's and when searching the web for a way round it i only find others asking the same question on how to... but so far ive found no answers, please if you know can you let all us wondering people in on your code! Thanks so much,

Tim
 
Upvote 0

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Thanks for following up Tim. I have a few questions at this point:

What did you want?

What did you try?

What did you get?
 
Upvote 0

Forum statistics

Threads
1,195,628
Messages
6,010,772
Members
441,568
Latest member
abbyabby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top