Option Explicit Dim Cpte As Long Dim FSO As New FileSystemObject Private Sub Command1_Click() CompterFichiers Text1.Text MsgBox Cpte End Sub Private Sub CompterFichiers(Path As String) Dim Folder As Folder Dim File As File Set Folder = FSO.GetFolder(Path) For Each File In Folder.Files Cpte = Cpte + 1 Next File For Each Folder In FSO.GetFolder(Path).SubFolders CompterFichiers Folder.Path Next Folder End Sub