View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jmblack jmblack is offline
external usenet poster
 
Posts: 1
Default Excel XMLMAPS error handling?

The code below works when the webpage serving the XML is up and
functional.
What I cant figure out is how to handle situations where strURL isnt
accessable

1) Internet is down
2) no internet connection at all
3) web server is down or spits an error rather than XML

The behavior Id want ideally is for XMLMAPS to NOT import a blank data
set if strURL doesnt deliver an XML feed. As it stands XMLMAPS
replaces existing data with NOTHING when it cant retrieve the XML. I
*DO* want XMLMAPS to replace existing data when it can retrieve the
XML... thoughts?

<EXCEL VBA Code

SectionName = TESTMAP
strURL =
http://eve-central.com/api/marketsta...8&typeid=11486

ActiveWorkbook.XmlMaps(SectionName).Import strURL, True

</Excel VBA Code