This should be an easy one. I'm checking to see if a file exists, and if so, then I'm trying to delete it. I'm getting hung up on the actual deletion part.
My unsuccessful snippet of code is commented out in the test procedure below. The function call to FileExists works fine. Please help if you can. Thanks!

Sub test ()
Dim XMLINPUTPATH as string
XMLINPUTPATH = "C:\ABC\XML_Input.xml"

'IF THIS FILE ALREADY EXISTS, THEN DELETE IT!
If FileExists(XMLINPUTPATH) Then
'delete file
' Dim oFileSysObj
' Set oFileSysObj = ?
' oFileSysObj.Deletefile XMLINPUTPATH
End If
End Sub

Public Function FileExists(sPath As String) As Boolean

If Dir(sPath) > "" Then
FileExists = True
Else
FileExists = False
End If

End Function