Hello,
I am fairly new to VBA. I need to write a macro that goes into 50 different files, copies a set range and pastes that in a single file.
I think I have got most of it sorted, I just need to figure out how to loop it 50 times.
I have managed to get this to work by manually repeating a section of code, however I know there must be a simple way than repeating the same section of code 50 times.
Can anyone help with how I can loop the code the desired number of times, each time going into a different file. i.e. changing DBname for each iteration.
I understand how to loop code with n iterations but I don't know to change the DBname variable with each iteration.
Thanks in advance for any assistance you can provide!
Bookmarks