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

Macros to copy data from a different file?

Karthik

New Member
Hi,


I've around 20 files in a particular folder on my computer, and I've a template with all the macros embedded in it. Is there a way I can go to the folder choose the first file, import it or copy the contents (just the first sheet of each file has data), paste it into my template, run the in-built macros and save each of the files under a unique name either on my desktop or in some other folder (whose file path i'll specify)? This has to be a loop, as many files need to processed.


Thanks!
 
Ron's got some code here that might be useful:

http://www.rondebruin.nl/copy4.htm


The part you'd need is just the bit about looping through all the workbooks in a folder. Combine that with a loop that does something like


Psuedocode

For each workbook in folder

open workbook

Run Macros

SaveasCopy

Next
 
Hi,

I am looking for code which can copy the data from a different application i am working on an application named as Host on Demand (http://www-01.ibm.com/software/webservers/hostondemand/) or wen say its a Main Frame application.can any one help me.
 
Back
Top