Hi Ron
I wanted to thank you for your help on this. The answer was a little too advanced for me at first, but after showing it to some friends at work, we realized it was a VB instruction in the macro section. It worked quite well. Now we will look to do some text string functions so only the file name and not the entire directory path appears in the cell
But I wanted to let you know, your answer really helped and I just wanted to thank you again
Pma
----- Ron de Bruin wrote: ----
Hi Pma
You can run this on a empty sheet to list all files in the folder C:\Dat
Sub test2(
Dim i As Lon
With Application.FileSearc
.NewSearc
.LookIn = "c:\Data
.SearchSubFolders = Fals
.MatchTextExactly = Fals
.FileType = msoFileTypeAllFile
If .Execute(msoSortOrderDescending) > 0 The
MsgBox "There were " & .FoundFiles.Count & " file(s) found.
For i = 1 To .FoundFiles.Coun
Cells(i, 1).Value = .FoundFiles(i
Cells(i, 2).Value = FileDateTime(.FoundFiles(i)
Next
Els
MsgBox "There were no files found.
End I
End Wit
End Su
--
Regards Ron de Brui
(Win XP Pro SP-1 XL2002 SP-2
www.rondebruin.n
Pmac said:
Is there a way to import a file directory listing from a folder into an Excel spreadsheet? Specifically to have one colum
with the file name and a second column with the date last modified, without having to type each entry in individually