Sub listefichierrecursive()
a = lfr("C:\data\nouveau test\", "*.xlsm") 'à adapter
Range("g3").Resize(UBound(a) + 1) = Application.Transpose(a)
End Sub
Function lfr(rep, filtre, Optional ByRef dict, Optional n = 0)
If IsObject(dict) = False Then Set dict = CreateObject("scripting.dictionary")
Set FSO = CreateObject("scripting.filesystemobject")
Set rep = FSO.getfolder(rep)
For Each repf In rep.subFolders
lfr repf, filtre, dict, n + 1
Next repf
For Each F In rep.Files
fn = F.Name
If F.Name Like filtre Then
dict(F.Name) = 0
End If
Next F
If n = 0 Then lfr = dict.keys
End Function