Looping through files in a folder

  • Thread starter Thread starter Edgar
  • Start date Start date
E

Edgar

Hi

Is it possible to run a macro that will open a file in a
folder and then apply some code and then close that file
and open up the next in the folder.

For eg:

For x = file1 to file100 (folder c:\test\")
Workbook(x).open
'Some code here
Next x

TIA
 

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

Back
Top