[COLOR=#0000ff]Dim fso As Object, Dossier As Object[/COLOR]
[COLOR=#0000ff]Dim Files As Object, File As Object, VPath As String[/COLOR]
[COLOR=#0000ff]Dim nbvrai As integer, nbfauxAs Integer[/COLOR]
[COLOR=#0000ff]Dim reponse As String[/COLOR]
[COLOR=seagreen]' Création de l'objet File System Object[/COLOR]
Set fso = CreateObject("Scripting.FileSystemObject")
[COLOR=seagreen]' Créé l'objet Dossier à partir du chemin definit[/COLOR]
[COLOR=blue]Set Dossier = fso.GetFolder("C:\Excel")[/COLOR]
[COLOR=blue]Set Files = Dossier.Files[/COLOR]
[COLOR=seagreen]' Si aucun fichier dans le dossier, on sort de la procédure[/COLOR]
[COLOR=blue]If Files.Count = 0 Then Exit Sub[/COLOR]
[COLOR=#2e8b57]' Sinon pour chaque fichier[/COLOR]
[COLOR=#2e8b57]' Empèche le rafraichissement d'écran[/COLOR]
[COLOR=red]Application.ScreenUpdating = False[/COLOR]
[COLOR=blue]For Each File In Files[/COLOR]
[COLOR=red] ' Contruit le chemin d'accès du fichier[/COLOR]
[COLOR=red] VPath = Dossier.Path & "\" & File.Name[/COLOR]
[COLOR=#ff0000] ' Ouvre le classeur[/COLOR]
[COLOR=red] Workbooks.Open vpath[/COLOR]
[COLOR=#ff0000] ' Effectue les tests[/COLOR]
[COLOR=blue] If ActiveSheet.OLEObjects("q1c1").Object.Value = "Vrai" then NbVrai=NbVrai +1[/COLOR]
[COLOR=blue] If ActiveSheet.OLEObjects("q1c1").Object.Value = "Faux" then NbFaux = NbFaux +1[/COLOR]
[COLOR=red] ' Ferme le classeur avant de passer au suivant[/COLOR]
[COLOR=blue][COLOR=red] Application.ActiveWorkbook.Close SaveChanges:=xlNo[/COLOR]
Next[/COLOR]
[COLOR=blue]'[/COLOR]
[COLOR=blue][COLOR=#ff0000]Application.ScreenUpdating = True[/COLOR]
'
msgbox nbfaux
msgbox nbvrai[/COLOR]
End Sub