While refreshing data excel hangs because the certain page is temporary not accessibl

M

maloo

I'm now using excel to run webqueries. But often a site is not
accessible, so I get a “ time out” message and I have to click on the
"ok" button to continue the update from the other pages. So, when I'm
not in front of my computer excel will stick from that moment on until
I click "ok" to continue.

I want to know if there is a solution to enforce excel to continue
updating the next pages after one is not accessible.

While refreshing data excel hangs because the certain page is temporary
not accessible. At this stage I’ve to press the “ok - button” in the
then appeared messagebox with “unable to open http……………..cannot locate
the internet or proxy server” to run the next webquery.

My purpose:
- run webqueries
- refresh each minute
- automatically continue to run next webquery when a certain page is
not accessible

I was thinking about using : Application.DisplayAlerts = False or On
Error Resume Next
My attempts have failed. Can Anybody help???

Worksheets("Sheet1").Select 'x
Cells.Select
Selection.ClearContents
Range("A2").Select
With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.aex.nl/scripts/marktinfo/OptieKoersen.asp?taal=nl&Symbool=AEX&a=1&History=YES"
_
, Destination:=Range("A2"))
..Name = "OptieKoersen.asp?taal=nl&Symbool=AEX&a=1&History=YES"
..FieldNames = True
..RowNumbers = False
..FillAdjacentFormulas = False
..PreserveFormatting = True
..RefreshOnFileOpen = False
..BackgroundQuery = True
..RefreshStyle = xlInsertDeleteCells
..SavePassword = False
..SaveData = True
..AdjustColumnWidth = True
..RefreshPeriod = 0
..WebSelectionType = xlSpecifiedTables
..WebFormatting = xlWebFormattingNone
..WebTables = "3"
..WebPreFormattedTextToColumns = True
..WebConsecutiveDelimitersAsOne = True
..WebSingleBlockTextImport = False
..WebDisableDateRecognition = False
..WebDisableRedirections = False
..Refresh BackgroundQuery:=False
End With
Range("A2").Select

‘THE SECOND QUERY STARTS HERE


Worksheets("Sheet2").Select 'x
Sheets("Sheet2").Select 'selecteer sheet
Cells.Select
Selection.ClearContents
Range("A2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.cboe.com/data/CFE/CFEmktstat.aspx",
Destination:=Range("A2"))
..Name = "CFEmktstat"
..FieldNames = True
..RowNumbers = False
..FillAdjacentFormulas = False
..PreserveFormatting = True
..RefreshOnFileOpen = False
..BackgroundQuery = True
..RefreshStyle = xlInsertDeleteCells
..SavePassword = False
..SaveData = True
..AdjustColumnWidth = True
..RefreshPeriod = 0
..WebSelectionType = xlSpecifiedTables
..WebFormatting = xlWebFormattingNone
..WebTables = "13"
..WebPreFormattedTextToColumns = True
..WebConsecutiveDelimitersAsOne = True
..WebSingleBlockTextImport = False
..WebDisableDateRecognition = False
..WebDisableRedirections = False
..Refresh BackgroundQuery:=False
End With
Range("A2").Select
End Sub
=============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top