View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter Jamieson[_2_] Peter Jamieson[_2_] is offline
external usenet poster
 
Posts: 9
Default VBA for the case when web request returns nothing.

Using Win xp, Office xp pro.

I routinely retrieve a page from a web site using the method:

' URL_UnitPrice is a string for the web address containing today's date
etc.....
Dim URL_UnitPrice as String
Workbooks.OpenText URL_UnitPrice

'This works quite happily except there are times when the web page is
not yet available due to delays or whatever.
How can I allow for this in my code?....that is, when the
Workbooks.OpenText does not return anything how do I refer to this
fact in VBA?
Any help much appreciated!
Cheers, Peter J.