Code is nonsensical.
You can't do a FOR EACH on a folder object.
You need to use the FILES collection.
For Each item In subfolder.Files
is a poor choice of name, as the FILES collection itself is made up of ITEMs. I prefer using some like
For Each fileobj In subfolder.Files