H
Option Explicit
Sub compilationClasseurs()
Dim W As Workbook, WL As Workbook, DCel As Range, i As Long
Dim adressesF, k As Byte, l As Byte
adressesF = Array("B20", "B22", "B24", "B26", "C80", "C92")
Application.ScreenUpdating = False
On Error Resume Next
Set W = ThisWorkbook
With Application.FileSearch
.NewSearch
[COLOR="Red"] .LookIn = "C:\Tempi"[/COLOR]
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Set WL = Workbooks.Open(.FoundFiles(i), 0)
Set DCel = W.Sheets(1).[A65536].End(xlUp).Offset(1, 0)
For k = LBound(adressesF) To UBound(adressesF)
DCel.Offset(, k) = WL.Sheets(1).Range(adressesF(k))
Next
Application.DisplayAlerts = False
WL.Close 'False
Next i
End If
End With
On Error GoTo 0
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Set W = Nothing
Set WL = Nothing
Set DCel = Nothing
End Sub