Ok, so I consider myself an Excel VBA expert (even though I\'ve not done much with it for a while) but I\'m stumped on this one - that obviously means it is something extrem
Ok - turns out the issue was actually with the folder and not the code. As pointed out by @Peh, I should have tested the code with another folder, as well as testing variations of the code itself. When using another folder, the For Each code worked fine. As stated in the OP, I just used For i = 1 to xFolder.Files.Count rather than For Each and got the result I needed, but I prefer the object-led approach of For Each rather than using an integer/long variable to go through the item count, and wanted to know why that method wasn't working.
To get the For Each code working, I copied the desired files to a different folder and it worked perfectly well. As the original folder was a network location, there was possibly some folder permissions or security setting preventing me from using the code I wanted to.