Function File Operations Class

KillIgnoreErrors

Delete a file, ignoring any errors that may occur, such as when the file does not exist.

Signature (Visual Basic / VBA)

Public Function KillIgnoreErrors( _
    ByVal vFileName As Variant _
    ) As Boolean

Code Example

    StringToFile("Marker.", "Debug.Tmp") = True
    ' Next call deletes Debug.Tmp
    KillIgnoreErrors("Debug.Tmp") = True
    ' Next call does nothing.
    KillIgnoreErrors("Debug.Tmp") = True

Parameters

Parameter Description
vFileName Name of the file to be deleted. Function returns False if vFileName is Null or cannot be fixed-up to a String.

Notes & Version History

Note Function returns True whether or not the file was successfully deleted.