Open Google Earth Using VBA for Access. Google Earth API

This article explains how you can use VBA for Access 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 Access:

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


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

One thought on “Open Google Earth Using VBA for Access. Google Earth API”

  1. jatay says:

    hi to all
    I Created a software in VB 2008 that in my “form1” when i click on “open image button” it display image on “picturebox1” with this format: jpg,.gif|.png,bmp,tiff ,tag.,ppm.,pgm.,kml.
    now i want in the same time “google earth” run, and this “picturebox1_image” overlay display in “google earth”.
    i can ran “google earth” but i don’t know how to add, send or open image in “google earth”.
    i run google eath by 2 below code
    Dim appGoogle As EARTHLib.ApplicationGE
    appGoogle = New EARTHLib.ApplicationGE

    now what do i do to open and display “picturbox1” in google earth?
    Then once I have selected “picturbox1” image; what would be the appropriate code to put that image into google earth?
    i wait to your help!
    please tutorial me.
    Once again; thanks for the help and any help is very much appreciated.

Leave a Reply

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