Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a macro that I want to run for every file in a particular folder.
i.e. At the moment I have
Sub Macro ()
(Macro code)
End Sub
I want something along the lines of:
Sub Macro ()
Set folder = 'C:\TEMP\'
For each file in folder
(Macro code)
Next file
End Sub
What's the correct code I should be putting in to get it doing the rest of my code for each file in the folder?
Thanks,
Neil
Hi Griffin,
Not sure if you're still working on this but I found Michael Anthony's solution on the below thread to be very helpful.
search for filenames in a directory within a macro
I used this loop to convert XML to Excel XLS format for all files in a folder, I trust you'll also find this to be very useful.
Thanks,
Ryan.