Loop to import worksheet from different workbooks inside one folder

  • Hi everyone,


    I hope someone will be able to help me with my issue.


    First, I would like to provide a little background. The goal of my code is to import each first worksheet from all workbooks inside a folder. Each worksheet is imported, processed and exported to a new folder, this is done to each file, but not at once. In order to do that, I am using a loop. I am not that much experienced with VBA, and I builded up the code below by googling, checking different threads, etc.


    My issue: the code is always processing only one file from the folder (infinite times) and never catching the others. Since we will be working with hundreds and maybe even thousands of files, I cannot rename the files to be imported, thereby their names do not follow any pattern, which is why the code should go through all ".xls" files located in a specific folder.



    Thanks in advance for any help :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!