getting filenames from a user selected folder
I found a way to accomplish this...
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Show
THEpath = .SelectedItems(1)
End With
With Application.FileSearch
.LookIn = THEpath
.FileType = msoFileTypeExcelWorkbooks
.Execute
ALLcount = .FoundFiles.Count
For i = 0 To ALLcount - 1
ALLpaths(i) = .FoundFiles(i + 1)
Next i
End With
-----------------
"Mitch" wrote:
I need to have the user select a folder using msoFileDialogFolderPicker then
get the count and file names of all files in the folder. Please help!
|