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: 25
Default Web query returned no data - turn off annoying message pop ups!

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:= _
 
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
Query returned more data than will fit on a worksheet Carrie Excel Worksheet Functions 6 May 6th 23 07:44 PM
Transposing data as it is being returned from an query hll Excel Programming 1 August 8th 07 09:32 PM
Query returned more data than will fit on a worksheet Mike H. Excel Discussion (Misc queries) 0 July 26th 07 08:38 PM
This query returned no data Tjeerd Excel Worksheet Functions 0 September 22nd 05 10:00 PM
The Web query returned no data [email protected] Excel Programming 1 February 9th 05 08:06 PM


All times are GMT +1. The time now is 09:21 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"