Il faut une macro sachant que, pour énumérer les fichiers, on peut utiliser soit la fonction Dir de Visual Basic, soit le File System Object :

 

Private Sub EnumFiles(FolderPath As String)
'macro écrite par Pierre Alexis
Dim sFile As String
sFile = Dir(FolderPath & "*", vbNormal)
While sFile <> ""
If sFile <> "." And sFile <> ".." Then
If (GetAttr(FolderPath & sFile) And vbDirectory) = 0 Then
MsgBox sFile
End If
End If
sFile = Dir
Wend
End Sub

 

Deuxième solution :

 

Private Sub EnumFiles(FolderPath As String
'macro écrite par Pierre Alexis
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
DimAs File
For EachIn fso.GetFolder(FolderPath).Files
MsgBox f.Path
Next
Set fso = Nothing
End Sub