As below, I have code that checks if the current file in a folder is the activeworkbook. If it is, I skip the workbook and move to the next. However, the objFile.Name is looking at what seems to be a temporary file and the ThisWorkbook.Name is the non-temporary file. See image below for question on how to deal with this. TX.
Code: Select all
For Each objFile In objFolder.Files
If objFile.Name = ThisWorkbook.Name Then GoTo nxtLoop '"~$Template_Combine.xlsm"
Workbooks.Open objFile