• 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.

Copy files and paste to new folder, delete sheets for multiple files and save

jk51

Member
Hi,

Help please. I want to create VBA excel 2010 macro to do all the following in 1 go :

1) Copy all files in download folder and paste (and can overwrite) all files to new folder path.
2) Each files in download folder contains 5 worksheets: sheet1, sheet2, sheet3, sheet4, sheet5. In the new folder I want to delete two worksheets "sheet1" and "sheet3" for each files.
3) Save all the update changes in the new folder. (No need to change the filename)

Thank you.

Mr Singh
 
Hello jk51

Welcome to Chandoo forum.

Here is the attached file..iam done with copy files from one folder to another folder..check that if it is working as per your requirement...i will go ahead and deleting sheets in the destination folder.


Note:
In macro file (Sheet1) there are two parameters that is "From" and "To" mention your path as per your requirement..

Let me know any challenges.
 

Attachments

  • jk51.xlsb
    20.7 KB · Views: 3
Hello jk51

Welcome to Chandoo forum.

Here is the attached file..iam done with copy files from one folder to another folder..check that if it is working as per your requirement...i will go ahead and deleting sheets in the destination folder.


Note:
In macro file (Sheet1) there are two parameters that is "From" and "To" mention your path as per your requirement..

Let me know any challenges.


Thank you Monty.
The from and to paths are both working properly. Number 1 is fine.
The next step is number 2, the delete sheets for multiple files in a new folder then save update files in the new folder.
I want all 3 steps in 1 macro not separate macros.

Thank you. Much appreciated.

Mr Singh
 
Hello Mr.Singh.

Here is the code complete code which will copy and move to new folder and delete the sheet1 and sheet3.


Hope you like this!!!!1
Let me know any challenges...Happy to help you.
 

Attachments

  • jk51.xlsb
    22.3 KB · Views: 6
Hello Padmaja.

Welcome to Chandoo forum.

Please find attached for your requirement.

Click on the file it will download to your system..Please let me know if any challenges...Happy to help you.
 

Attachments

  • Padmaja.xlsb
    22.3 KB · Views: 4
Back
Top