Private Sub ClearRecycleBin(Optional ByVal RootPath As _
String, Optional ByVal hwndParent As Long, Optional _
ByVal NoConfirmation As Boolean, Optional ByVal _
NoProgress As Boolean, Optional ByVal NoSound As _
Boolean)
Dim nOptions As Long
Const SHERB_NOCONFIRMATION = &H1
Const SHERB_NOPROGRESSUI = &H2
Const SHERB_NOSOUND = &H4
If NoConfirmation Then nOptions = SHERB_NOCONFIRMATION
If NoProgress Then nOptions = nOptions Or _
SHERB_NOPROGRESSUI
If NoSound Then nOptions = nOptions Or SHERB_NOSOUND
On Error Resume Next
SHEmptyRecycleBin hwndParent, RootPath, nOptions
End Sub
|