Bonjour,
Pour la liste du nom des dossiers qui se trouvent au même endroit que le fichier qui contiendra cette macro ( chemin ThisWorkbook.Path )
Sub Dossiers()
Application.ScreenUpdating = False
Dim myPath As String, myFolder As String
myPath = ThisWorkbook.Path
myFolder = Dir(myPath & "\*", vbDirectory)
c = 2
Do While myFolder <> ""
If GetAttr(myPath & "\" & myFolder) = vbDirectory Then
Cells(c, 1) = myFolder
c = c + 1
End If
myFolder = Dir()
Loop
End Sub
En bonus pour la liste des noms de fichiers qui se trouvent dans le même répertoire que le fichier qui contient la macro :
Sub Fichiers()
Application.ScreenUpdating = False
Dim myPath As String, myFile As String
myPath = ThisWorkbook.Path
myFile = Dir(myPath & "\*.*")
c = 2
Do While myFile <> ""
Cells(c, 2) = myFile
myFile = Dir()
c = c + 1
Loop
End Sub