简体   繁体   中英

How to delete all files in folder from shared excel file

I have one shared excel file and i want to make a button in excel file on that shared excel file that will delete all the files from folder abc. Below code is working fine but only issue is it deleting when file is shared.

Sub delete()
    Kill "\Desktop\Tracking\*.xl*"
End Sub

is it possible to delete the files in folder from shared excel file.

Thanks

Still not sure I'm getting what your asking... Is this shared excel file going to delete files off of each persons C drive? If so maybe the following will help.

Kill "C:\Users\" & Environ("username") & "\Desktop\Tracking\*.xl*"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM