Creating a VBA Macro loop "doing" stuff on each file in a folder

S

Snoopy

Hey guys
I have this folder containing several workbooks, and the number of
files will variate/increase

Foldername: ReportA
containing files:
aaaa.xls
dddd.xls
dfger.xls
otgrr.xls
etc

In this folder I want to copy all data from the sheet "Sheet1" in each
workbook and paste it into a "sheet1" in my summaryfile somwhere else
outside this folder.
At the present I have many macros in my summaryfile - one pr each file
in "ReportA" - doing the same shit on every singel file.
The effect is that I have to make one more macro for every new file in
the folder.

I think there must be a easy way to make the macro work thru the files
like a look-something
This will make a lot easyer to maintain my file-reportsystem.

Anyone that feel the comfort in helping "the wet dog"?

Thankfully regards
Snoopy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top