I just had one of those moments where you step out of the weeds and examine your code and ask yourself "why did I do that?"
I have a script that creates a folder with several subfolders and files using the FileSystemObject
. Everything works, but I guess I've been varying the way I set my fso
variables.
My project uses the the Microsoft Scripting Runtime Library
reference so that I can use early binding (even though I found several instances of Set fso = CreateObject("Scripting.FileSystemObject"
), which is silly for this project). Perhaps it's because I've based a lot of my code from examples online, but I've been setting these fso variables in one of two ways:
Set FSo = New FileSystemObject
Set FSo = New Scripting.FileSystemObject
What is the difference between these? Does it matter which I use, or is one used only in certain cases?