hi all,

I am new to VB 6.0 . I have created an application, which generates a .kml file which is the format read by google earth at a particular location. I want to be able to open the .kml file by clicking a command button.

I am right now using the following code
Private Sub Command1_click

Dim dtask As Double
Dim path As string
Dim file As String

path="C:\Program Files\Google\Google Earth\googleearth.exe
File="C:\Abhinav.kml"
dtask=Shell(path+""+File,vbNormalFocus)

End Sub

but unfortunately this code give " Invalid Procedure call or argument" i.e. runtime error 5

If somebody can help me with this then i'll be very thankful

I'm not sure if this will work or not but I see that it will be trying to run the code

C:\Program Files\Google\Google Earth\googleearth.exeC:\Abhinav.kml - aka no spaces,

what happens if you put in a space

dtask=Shell(path & " " & File,vbNormalFocus)