Cycling through files in a directory

rmccafferty

Registered User.
Local time
Today, 06:12
Joined
Jul 20, 2009
Messages
15
I need to do two things in VBA that I do not really have a clue how to do and am hoping for specific advice.

Fist, I need to use the DIR function to loop through a number of Excel files, perform actions from them one by one, then end the process when each file has been processed.

Second, when the above is completed, I need to move all files in that defined directory to a different one.

I am comfortable in a lot of areas of VBA but I am no expert in it. These two tasks are ones I have never encountered before.
 
If you set a reference to the Microsoft Scripting Runtime you can create an instance of a FileSystemObject, which exposes a variety of methods for file and folder manipulation.
 

Users who are viewing this thread

Back
Top Bottom