Create a list of all files in a folder
On Jan 26, 3:50*pm, lombardm wrote:
I would like to create alistofallthefilesin afolder, but am
fumbling with the detail. The code below only lists thefileswith
extension ".doc" in thefolderin question. There ore other types offiles(.pdf, .tiff) but they are not listed. Any reason why, and how
does one work around it.
Thanks
Laurence
Sub test2()
With Application.FileSearch
* * For i = 1 To .FoundFiles.Count
* * * * MsgBox .FoundFiles(i)
* * * Sheets("Sheet1").Range("A" & i).Value = .FoundFiles(i)
* * Next i
End With
End Sub
I think I must do some homework before requesting help. A quick search
of this group reveals several discussions on this topic, so I need to
follow that up first. Excuse the hasty post!
|