-----Original Message-----
Hi
try
Sub FindFiles()
Dim myPath As String
Dim lLen As Long, i As Long
Dim parts
myPath = "D:\temp" 'change to your needs
With Application.FileSearch
.NewSearch
.LookIn = myPath
.SearchSubFolders = True
.Filename = "*.*"
.FileType = msoFileTypeExcelWorkbooks
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
parts = Split(.FoundFiles(i), "\")
Cells(i, 1) = parts(UBound(parts))
Cells(i, 2).FormulaR1C1 = "=Hyperlink(" & Chr(34) &
..FoundFiles(i) _
& Chr(34) & ",R[0]C[-1])"
Next i
Else
MsgBox "There were no files found."
End If
End With
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
Hi Frank
Thanks a million for quick reply. The code worked but I
was hoping for different result.
I was hoping if possible to List in the followng format
Folder Name
File Name (without the full path) : Hyperlink
.
.
Folder Name
File Name (without the full Path) : Hyperlink
.
.
End
Please advise if possible
Thanks
james
.