Sub TheSearcher()
Dim ThisBookPath As String, TabFilePathName() As Variant
Dim FileSearcher As FileSearch
Dim ThePath As String
Dim i As Integer
Set FileSearcher = Application.FileSearch
ThisBookPath = ThisWorkbook.Path
ThePath = ThisBookPath
With FileSearcher
.NewSearch
.Filename = '*.xls*'
.LookIn = ThePath
.SearchSubFolders = True
.Execute msoSortByFileName, msoSortOrderAscending
If .Execute > 0 Then
With .FoundFiles
For i = 1 To .Count
ReDim Preserve TabFilePathName(2, 0 To .Count - 1)
TabFilePathName(0, i - 1) = .Item(i)
TabFilePathName(1, i - 1) = Dir(.Item(i))
Next i
End With
Else
MsgBox 'Pas de Fichier trouvé dans ' & ThePath
Exit Sub
End If
End With
Set FileSearcher = Nothing
Range('A2').Resize(UBound(TabFilePathName, 2) + 1, UBound(TabFilePathName, 1)) = Application.Transpose(TabFilePathName)
End Sub