• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

delete the file by vba

file that i have to delete is located in C:\Users\user\Desktop\Stock Market\Sholtan\1.xlsm
macro will be placed in C:\Users\user\Desktop\Stock Market\Sholtan\2a.xlsb
 
It totally depends on how your system is!

If the name and path is specific (as in your question) then you can write two statements
Code:
kill file1

kill file2
 
You can try this.
Place this file in the same folder as the one where you want to delete files.
Listbox will be filled with the excel files.
Select a file and delete, select next and delete and so on...
 

Attachments

  • 2a.xlsb
    22.1 KB · Views: 5
Back
Top