3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by PM312
0

Hi,

You can delete any file from the disk using the KILL command

Syntax:
KILL <filename with path>

Before deleting any file you can check if it exists in the path or not first.

If Dir("D:\PRLIST.XLS", vbNormal) <> "" Then
        If MsgBox("DELETE FILE?", vbYesNo + vbInformation, "DELETION") = vbYes Then
            Kill "D:\PRLIST.XLS"
        End If
    Else
        MsgBox "No Such File Exists."
    End If

Regards
Shaik Akthar

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.