ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   error handling not working (https://www.excelbanter.com/excel-programming/325366-error-handling-not-working.html)

Mike Macgowan

error handling not working
 
I am using a get external data function to data mine a site that doesn't
seem to stay up. I would like my error handler to wait 5 min. and try again.
The issue I have is that I keep getting a runtime error even though I have
an on error statement. Any ideas are greatly appreciated.

The run-time error is created on both Excel 2000 and Excel 2002.

On Error GoTo lookupq
lookupq:

With Selection.QueryTable
.Connection =
"url;http://yp.yahoo.com/py/ypResults.py?...080&cs=5&ed=Sn
0nqK1o2Tw0.9HPRRleuMAQeeYXa9fQwG42xMx_8nidwQ--&tab=B2C&stx=85537085&stp=y&de
sc=All+Churches&stat=ClkNxtUpper&ls=&lp=&zip=" + CStr(zip) + "&offset=" +
CStr(Offset)

'http://yp.yahoo.com/py/ypResults.py?Pyt=&zip=80210&country=us&msa=2080&cs =5
&ed=Sn0nqK1o2Tw0.9HPRRleuMAQeeYXa9fQwG42xMx_8ni dwQ--&tab=B2C&stx=85537085&st
p=y&desc=All+Churches&stat=ClkNxtUpper&ls=&lp=

'http://yp.yahoo.com/py/ypResults.py?Pyt=Typ&zip=80210&country=us&desc=All +C
hurches&offset=20&FBoffset=0&toggle=&stat=ClkNxtUp per&ls=&lp=
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With




All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com