Private Function GE_Send_Kml(Kml_file As String) As Integer
'************************************************************************************

'This procedure sends a kml file to GE

'The input parameters are:

'       Kml_file = name of kml file

'Notes on this procedure:

'       None

'************************************************************************************
    
    'Assume send is going to fail with GE error
    GE_Send_Kml = False
    
    'Set up error handler
    On Error GoTo BAD_GE
        
    'Send kml file to GE, set the suppressMessages parameter to True to suppress
    'garbage messages from GE
    Call GE_interface.OpenKmlFile(mydirectory + Kml_file + ".kml", True)
    
    'Turn default error handling back on
    On Error GoTo 0
    
    'Flag send has been successful
    GE_Send_Kml = True
    
    'Quit
    Exit Function
    
'************************************************************************************

'This GOSUB handles a GE error...

'************************************************************************************

BAD_GE:
        
    'Turn default error handling back on
    On Error GoTo 0

    'In the next split second a similar error should occur in GE_interrogate_Timer
    'which can tidy up

End Function