Function RemoveFile(FilePathAndName As String) As Boolean
On Error Resume Next 'Rimuove un file dal drive. 'NON VIENE INSERITO SU RECYCLE BIN! Err.Clear RemoveFile = True Kill FilePathAndName If Err Then MsgBox Err.Description Err.Clear RemoveFile = False End If End Function 'Es. If RemoveFile ("c:\temp\test.txt") = False Then MsgBox "File non cancellato." End If |