B
Bruce
Hi - am using the following querytable code to retrive data from a internet
site into excel where qurl is my webaddress.
With DataSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=DataSheet.Range(qStart))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
'Sometimes' I get Run-time error 1004. Unable to open (i.e. the aurl I have
specified). I know the link I have specified is valid, just that it fails
sometimes as if i continue from the break, it will complete after a retry or
2.
Can I somehow trap Error Code 1004 so that I can retry x times (say 5
times). If this fails, then end the sub-routine and run msgbox("The link is
currebtly unavailalbe").
This sounds logical to me, but I got no idea how to program it.
Bruce
site into excel where qurl is my webaddress.
With DataSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=DataSheet.Range(qStart))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
'Sometimes' I get Run-time error 1004. Unable to open (i.e. the aurl I have
specified). I know the link I have specified is valid, just that it fails
sometimes as if i continue from the break, it will complete after a retry or
2.
Can I somehow trap Error Code 1004 so that I can retry x times (say 5
times). If this fails, then end the sub-routine and run msgbox("The link is
currebtly unavailalbe").
This sounds logical to me, but I got no idea how to program it.
Bruce