error handling not working

M

Mike Macgowan

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?Pyt=&country=us&msa=2080&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_8nidwQ--&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=ClkNxtUpper&ls=&lp=
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
 

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