The macro that I have loops through a directory and opens all files and copies sheet(3) from each file and places it into the current workbook as separate sheets. The problem I am having is closing the just opened workbook. When the macro is done I have all of these opened workbooks. I tried using activeworkbook.close but it wants to close the workbook that I want to stay open. The one that the macro is running in. I could run separate code that loops through all of the open workbooks and closes all of them but the one I want left open. I was hoping that it could be done within the same loop.
Bookmarks