VBA Delete File from Folder

VBA to delete a file from windows folder. You need to enable Microsoft Scripting Runtime library in Tools-> References to be able to use this code.

With New FileSystemObject
If .FileExists("Z:\Downloads\realgain.xls") Then
.DeleteFile "Z:\Downloads\realgain.xls"
End If
End With