Morning everyone.
Can somebody please explain to me why the following code produces different results?
Private Sub Test()Set fso = CreateObject("Scripting.FileSystemObject")
Dim Coll as new Collection, objFile as File
Set objFile = fso.GetFile(Insert filepath here)
Coll.Add(objFile)
Coll.Add objFile
End Sub
In the first collection entry, it is a string object, and in the second collection entry, it is a file object.
Took me a few hours to realize what was going wrong, but can't figure out why the two lines should be added differently?
Thanks