Auto open KML file in Google Earth

  • Wow, that's a lot cleaner Pike. Many thanks for your hep with this, I'm learning a lot.


    However I still get the Save *.kml dialogue when clicking the command button.
    I did have some other VBA which opened Google Earth on click.


    Can the Save As code be Open Application?


    Code
    filepath = Application.GetSaveAsFilename(".kml", "Google Earth files (*.kml),*.kml", 1, "Save As *.kml")


    Code
    Open Application.DefaultFilePath & "quote.kml" For Output As #1
  • it can try,,,

  • THANK YOU PIKE!!!
    You have nailed it.


    It worked flawlessly.


    I then changed the "Hidden" A2 cell to C:\Windows\Temp\Charter Quote.kml which opened a Save As dialog but once saved, it now overwrites the file and automatically launches Google Earth with the kml file when the command button is clicked.


    Bravo, I will be donating $50 to your nominated charity.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!