Posts by camle

    Re: Excel VBA to move file to recycle bin


    Is there a 64 Bit version? or maybe a different way in VBA?




    Code
    Private Declare Function SHFileOperation Lib "Shell32.dll" _
    Alias "SHFileOperationA" (lpFileOp As SHFILEOPTSTRUCT) As Long


    And


    Code
    If SHFileOperation(fop) <> 0 Then Err.Raise 30001, "Deletefile", "Unable to " IIf(recycle, "recycle ", "delete ") " & UCase(Filename)


    Are in red


    Thanks