Public Function IsFile(ByVal fName As String) As Boolean
 On Error Resume Next
 IsFile = ((GetAttr(fName) And vbDirectory) <> vbDirectory)
End Function
Public Function FileExists(ByVal FileToTest As String) As Boolean
   FileExists = (Dir(FileToTest) <> "")
End Function
If FileExists(FileToDelete) Then