I iterate over a set of directories using a file system object, and I want to specify an additional directory to scroll through. For example, I currently have:
Sub test()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Directory)
Set colSubfolders = objFolder.Subfolders
For Each objSubfolder In colSubfolders
' take some action
End For
End Sub
But I want to specify an additional folder for scrolling, for example:
colSubfolders = colSubfolders + "additionalpath"
For Each objSubfolder In colSubfolders ....
Alternatively, you can specify several objects in the loop command, for example:
For Each objSubfolder in colSubfolders, "additionalpath"
source
share