VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Delete a file that exists on a 3.5 floppy disk.

by Brandon (46 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 27th May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Delete a file that exists on a 3.5 floppy disk.

Rate Delete a file that exists on a 3.5 floppy disk.



'make sure to create the file byefile.txt on a 3.5 floppy
'to make sure the file is deleted after you execute this program.
Private Sub mnuEditDeleteFile_Click()
'delete a file existing on disk
Dim Delete
On Error GoTo ErrHandler:
Delete = MsgBox("Are you sure you want to delete this file?", vbYesNo + vbQuestion, "Delete File")
If Delete = vbYes Then
    Kill "a:\byefile.txt"
End If
ErrHandler:
    MsgBox "File does not exist, create a file to delete", vbCritical
End Sub


Download this snippet    Add to My Saved Code

Delete a file that exists on a 3.5 floppy disk. Comments

No comments have been posted about Delete a file that exists on a 3.5 floppy disk.. Why not be the first to post a comment about Delete a file that exists on a 3.5 floppy disk..

Post your comment

Subject:
Message:
0/1000 characters