Create a loop to open all specific XLS in one folder

davemorse

Board Regular
Joined
Mar 15, 2006
Messages
141
Hi,

What I'd like to do is open up all excel documents in the same folder as the xls in which the macro is running from. So say i have a folder in c:\test\macro.xls, i want all xls files here to open and a prerecorded macro to run on all these files and save them all.

Ive created variables such as mypath and myname, how do I loop the macro to run.

Thanks
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Watch MrExcel Video

Forum statistics

Threads
1,113,861
Messages
5,544,723
Members
410,630
Latest member
JFORTH97
Top