FilterXML produces error "1004".

Copper Contributor

I'm use Bing Maps API to gather a matrix of distances between a team of reps and collection of store locations. The code handles nearly every pair of store/rep combinations except 2. It is the same error produced every time. I looked at the XML retrieved from Bing and I see no difference between XML information FilterXML is able to parse the information and the two instances where FilterXML generates error 1004.

 

here is the line that results in the error:

Addresses.Parent.Range(ServerItem).Offset(0, iColumns) = WorksheetFunction.FilterXML(Server.ResponseText, "/Response/ResourceSets/ResourceSet/Resources/Route/TravelDistance")

 

TravelDistance tags appear, and a valid number is between the tags. I'm stumped why 2 out of 500 pairs fail. (The same rep and all other stores run fine, the same store and all other reps runfine)

0 Replies