errors when running GetDistance between 2 zipcode 07522 and 10457

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Using your VBA for GetDistance between zip codes. Some work, and some error out -1. For example (07522 ,10457) returns -1 while the other 2 combinations are working properly, such as (08736,10457) and (08846,10457).
On google, the maps program calculates the distance for all of these 3 combinations.
Please let me know your thoughts on a posisble solution. Thank you –


Hi Peter,

interesting issue. Input the URL variable from line 8 into your browser and see the Google query result. You should have a description of the issue or at least understand why you are getting this error.

Simply the best place to learn Excel VBA