Thread
:
Web query returned no data - turn off annoying message pop ups!
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Web query returned no data - turn off annoying message pop ups!
It appears that you may be creating new queries. If desired, send your
workbook to me for a look. You may want to go here and download a free file
of mine to download. 200 stocks with one mouse click.
goto
and look in the files section. There are several free files.
I have a couple of free files under author donalb36
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"christian_spaceman" wrote in message
...
Hi all,
I've googled this a few times, but can't appear to find a solution.
I've just set up a spreadsheet which imports stock information. This
uses a webquery, refresehd once a minute, which is added through vba
and pasted below (bit horrible as it was recorded).
The stock name is in stockCell.value
Every so often, an error message pops up with "This web query returned
with no data... blah blah blah". Everything stops until I respond with
"OK" to this. Given that I want the macro to run constantly without my
babysitting it, it would be very useful to be able to turn this off.
Does anyone know how to do it? All I can think of is
application.displayalerts = false. I've put this in workbook_open and
it makes no difference. Given tha the web queries update automatically
once a minute, I'm not sure where to tackle this in the vba
Many thanks in advance,
Chris
ith ThisWorkbook.Sheets(stockCell.Value).QueryTables.A dd(Connection:=
_
"URL;http://uk.finance.yahoo.com/q?s=" &
stockCell.Value, Destination:=Range("A10"))
.Name = "q?s=" & stockCell.Value & "_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 1
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "9,13,15"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With ' end of With
ThisWorkbook.Sheets(StockCell.Value).QueryTables.A dd(Connection:= _
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett