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

copying folder from one location to another

macro_learning

New Member
can anyone please check , why is the macro written in the attached file not working?

I want to copy folder from one location to another location.

Regards,
macro_learning
 

Attachments

  • copying1.xlsm
    13.5 KB · Views: 1
Thanks for you reply..

I have changed the setting ,

upload_2016-8-11_23-1-43.png

still the code in the attached excel is not working.

Please help.

Regards,
macro_learning
 

Attachments

  • copying1.xlsm
    13.8 KB · Views: 0
Sorry, if you look at the example in linked, you need to create the FSO to be able to use it. Can't simply summon it out of thin air. :p

Code:
Sub FSO_Example()
 Dim fs As FileSystemObject
 Set fs = New FileSystemObject
 fs.CopyFolder "C:\My Dcouments\My Folder", "C:\My Dcouments\To Here\"

End Sub
 
Thank you so much... you are life saver..

what will be the code for
1. list down the name of the files in any given folder with their extension
2. and copy the files with any particular extension or type like .csv or .rpt and then paste these filesin another location.

Regards,
macro_learning
 
Back
Top