Kill
Syntax:
Function Kill(ByVal FileName As String) As Boolean
Parameters:
Name Type Description
FileName
String
Remarks:
The Kill method deletes a file. Using this method is the same as clicking File } Delete in the Windows Explorer or in My Computer in Windows. An open file cannot be deleted.
Examples:
The following VBA example deletes the file temp.out in the current folder.
KILL "temp.out"
The following VBA example deletes the file temp.out in the C:\MyDocs folder.
KILL "C:\MyDocs\temp.out"