learning the ropes
New member
- Local time
- Today, 08:27
- Joined
- Sep 15, 2010
- Messages
- 2
I am trying to create a button on a form that will open Google Earth and open a specific file. This is what I have so far . . .
----------------
Private Sub GoogleEarth_Click()
On Error GoTo Err_GoogleEarth_Click
Dim stAppName As String
stAppName = "C:\Program Files\Google\Google Earth\googleearth.exe powellpoints2.kmz"
Call Shell(stAppName, 1)
Exit_GoogleEarth_Click:
Exit Sub
Err_GoogleEarth_Click:
MsgBox Err.Description
Resume Exit_GoogleEarth_Click
End Sub
----------------
It opens GE, but then I get this error message:
"Could not open file powellpoints2.kmz for reading"
I thought the problem might be KMZ instead of KML, so I unzipped the KMZ and replaced "powellpoints2.kmz" with "pp2_kml\doc.kml" but got the same message (different file name, obviously).
Once I am in GE I have no problem opening file (either way - KMZ or KML) myself. So I don't think it's a problem with the files.
I am using Windows XP and Access 2002.
Sorry if this is a simple question. I am, as the name implies, learning the ropes.
Thx.
----------------
Private Sub GoogleEarth_Click()
On Error GoTo Err_GoogleEarth_Click
Dim stAppName As String
stAppName = "C:\Program Files\Google\Google Earth\googleearth.exe powellpoints2.kmz"
Call Shell(stAppName, 1)
Exit_GoogleEarth_Click:
Exit Sub
Err_GoogleEarth_Click:
MsgBox Err.Description
Resume Exit_GoogleEarth_Click
End Sub
----------------
It opens GE, but then I get this error message:
"Could not open file powellpoints2.kmz for reading"
I thought the problem might be KMZ instead of KML, so I unzipped the KMZ and replaced "powellpoints2.kmz" with "pp2_kml\doc.kml" but got the same message (different file name, obviously).
Once I am in GE I have no problem opening file (either way - KMZ or KML) myself. So I don't think it's a problem with the files.
I am using Windows XP and Access 2002.
Sorry if this is a simple question. I am, as the name implies, learning the ropes.
Thx.