+ Reply to Thread
Results 1 to 3 of 3

VBA Route Calculator - Google Maps Api 22 Minutes quicker than Actual Google Website

  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    39

    VBA Route Calculator - Google Maps Api 22 Minutes quicker than Actual Google Website

    Hi,

    I shamelessly downloaded an Excel route distance and time calculator online and I've tweaked the VBA code to help cater my end goals.

    I've added some extra via's that I needed (as the original only contained two), chosen to avoid tolls and I've changed the units to metric as I need it in kilometers, as opposed to miles.

    All seemed well.

    However, I ran an example through the Excel version and compared to the same route.

    The distance is exact, but the time is always 22 minutes quicker on the Excel result than if I run the same scenario through the Google maps online website.

    I've checked through the code but I'm unable to find out how to add those 23 minutes on to the final time so was wondering if any one could please give me some pointer on where abouts to do this?

    I imagine it's something to do with this part, perhaps...

    Please Login or Register  to view this content.
    The full code is as follows:

    Please Login or Register  to view this content.
    Last edited by lookingforhelp1; 11-06-2015 at 09:57 AM.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA Route Calculator - Google Maps Api 22 Minutes quicker than Actual Google Website

    Step through the code (F8) and using the Locals window or the Watches window (highlight a variable then hit Shift + F9), watch the values of all your time-related variables. Do those variables ever sync with the Google results? If so, at what point do they no longer sync? If not, at what line are they getting assigned incorrect values?
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: VBA Route Calculator - Google Maps Api 22 Minutes quicker than Actual Google Website

    Id agree, theres no use trying to hack the results to match, you need to find the problem. What happens if you put a route in that is less than 22minutes long?
    If someone has helped you then please add to their Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Google Maps - Distance Calculator
    By attaul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2014, 05:24 AM
  2. Excel - Google Maps API Distance Calculator
    By philipryoung in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-11-2014, 06:00 AM
  3. hyperlink for google maps
    By [email protected] in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2013, 05:48 PM
  4. Google Maps integration
    By GeorgY in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2011, 10:51 PM
  5. Google Maps in Excel?
    By kklein in forum Excel General
    Replies: 8
    Last Post: 09-26-2011, 06:54 PM
  6. Replies: 0
    Last Post: 11-05-2009, 04:47 AM
  7. Google maps in excel
    By censura in forum Excel General
    Replies: 0
    Last Post: 02-21-2008, 04:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1