Open Google Earth Using VBA for Excel. Google Earth API

This article explains how you can use VBA for Excel to open google earth.

Note: The google earth API will only be available if you have Google Earth installed on your computer.

The first step would be to add reference to the Google Earth 1.0 Type Library. Note the version might be different on your computer.

Using the code below you will be able automate Google Earth from Excel:

Sub main()
Dim appGoogleEarth As EARTHLib.ApplicationGE
Set appGoogleEarth = New EARTHLib.ApplicationGE
End Sub

Result:
Result

You can download the file and code used in this article from the link below:

Leave a Reply

Your email address will not be published. Required fields are marked *

privacy policy