Here is an alternative:
VB Code:
Set fs = CreateObject("Scripting.Filesystemobject") Set f = fs.GetFolder("c:\") counter = 1 For Each i In f.Files Cells(counter, 1) = i counter = counter + 1 Next
Obviously you don't need the counter and can replace the Cells line with whatever you wish to do with the file. Set the path in the second line, or use a dialogbox to let the user select it.
zaza




Reply With Quote