Hi.
In an Access database, in a Form user selects a file name to delete it from some directory. user needs to be able to do multiple deletion at a time. I've changed the List Box property to Extended Multi Select, but I'm confused how to recode a Sub, so it will KILL all the selected files.
My code for Single selected row is:
Private Sub cmdDeleteFile_Click()
dim strPath as string
dim strPath="c:\\FilesToBeDeleted"
If Not IsNull(Me.lstFiles) Then
Kill strPath & "\" & Me.lstFiles
Else
MsgBox "No file was selected."
End If
End Sub
Thank you all in advance
In an Access database, in a Form user selects a file name to delete it from some directory. user needs to be able to do multiple deletion at a time. I've changed the List Box property to Extended Multi Select, but I'm confused how to recode a Sub, so it will KILL all the selected files.
My code for Single selected row is:
Private Sub cmdDeleteFile_Click()
dim strPath as string
dim strPath="c:\\FilesToBeDeleted"
If Not IsNull(Me.lstFiles) Then
Kill strPath & "\" & Me.lstFiles
Else
MsgBox "No file was selected."
End If
End Sub
Thank you all in advance