[FONT=Fixedsys]Option Explicit[/FONT]
[FONT=Fixedsys]Public Sub GetDataFromFolder()[/FONT]
[FONT=Fixedsys] Const sFolder As String = "[COLOR=red]C:\Desktop\FAB\[/COLOR]"[/FONT]
[FONT=Fixedsys] Dim sFilename As String[/FONT]
[FONT=Fixedsys] Dim ws As Worksheet[/FONT]
[FONT=Fixedsys] Dim wkbk As Workbook[/FONT]
[FONT=Fixedsys] Dim iRow As Long[/FONT]
[FONT=Fixedsys] Dim dStart As Date[/FONT]
[FONT=Fixedsys] dStart = Now()[/FONT]
[FONT=Fixedsys] Set ws = ThisWorkbook.Sheets(1)[/FONT]
[FONT=Fixedsys] ws.UsedRange.ClearContents[/FONT]
[FONT=Fixedsys] ws.Range("A1:D1") = Array("A2", "B2", "D5", "E10")[/FONT]
[FONT=Fixedsys] iRow = 1[/FONT]
[FONT=Fixedsys] [/FONT]
[FONT=Fixedsys] sFilename = Dir(sFolder & "*.xl*")[/FONT]
[FONT=Fixedsys] Do Until sFilename = ""[/FONT]
[FONT=Fixedsys] Application.EnableEvents = False[/FONT]
[FONT=Fixedsys] Set wkbk = Workbooks.Open(sFolder & sFilename, , True)[/FONT]
[FONT=Fixedsys] Application.EnableEvents = True[/FONT]
[FONT=Fixedsys] iRow = iRow + 1[/FONT]
[FONT=Fixedsys] With wkbk.[COLOR=blue]Sheets(1)[/COLOR][/FONT]
[FONT=Fixedsys] .Range("A2").Copy Destination:=ws.Cells(iRow, "A")[/FONT]
[FONT=Fixedsys] .Range("B2").Copy Destination:=ws.Cells(iRow, "B")[/FONT]
[FONT=Fixedsys] .Range("D5").Copy Destination:=ws.Cells(iRow, "C")[/FONT]
[FONT=Fixedsys] .Range("E10").Copy Destination:=ws.Cells(iRow, "D")[/FONT]
[FONT=Fixedsys] End With[/FONT]
[FONT=Fixedsys] Application.EnableEvents = False[/FONT]
[FONT=Fixedsys] wkbk.Close (False)[/FONT]
[FONT=Fixedsys] Application.EnableEvents = True[/FONT]
[FONT=Fixedsys] sFilename = Dir()[/FONT]
[FONT=Fixedsys] Loop[/FONT]
[FONT=Fixedsys] [/FONT][FONT=Fixedsys] [/FONT]
[FONT=Fixedsys] MsgBox "Done: " & CStr(iRow - 1) & " files imported" _[/FONT]
[FONT=Fixedsys] & Space(10) & vbCrLf & vbCrLf _[/FONT]
[FONT=Fixedsys] & "Run time: " & Format(Now() - dStart, _[/FONT]
[FONT=Fixedsys] "hh:nn:ss"), vbOKOnly + vbInformation[/FONT]
[FONT=Fixedsys]End Sub[/FONT]