G
Guest
I am trying to get the names of all subdirectories in a folder. I am
encountering a problem when trying to get the name from the item(). Here is
what I am doing, and the error message I receive. Any suggestions on what I
am doing wrong?
Set fs = CreateObject("scripting.filesystemobject")
Set f = fs.GetFolder("C\")
Set subs = f.subfolders
MsgBox subs.Item(1).Name
The error I get is Run Time Error 5
Invalid procedure call or argument.
Thanks
encountering a problem when trying to get the name from the item(). Here is
what I am doing, and the error message I receive. Any suggestions on what I
am doing wrong?
Set fs = CreateObject("scripting.filesystemobject")
Set f = fs.GetFolder("C\")
Set subs = f.subfolders
MsgBox subs.Item(1).Name
The error I get is Run Time Error 5
Invalid procedure call or argument.
Thanks