Sub import_pro2()
Dim i As Long, a As Workbook, donnees As Range
Application.ScreenUpdating = False
With Application.FileSearch
.NewSearch
.Filename = "*.pro"
.LookIn = ThisWorkbook.Path
.Execute
For i = 1 To .FoundFiles.Count
Workbooks.OpenText .FoundFiles(i), _
Origin:=xlWindows, StartRow:=2, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True, Space:=False, Other:=False
Set a = ActiveWorkbook
Set donnees = a.Sheets(1).[A1].UsedRange
ThisWorkbook.Sheets("IMPORTATION").[A65536].End(xlUp)(2) = Split(.FoundFiles(i), "\")(UBound(Split(.FoundFiles(i), "\")))
donnees.Copy ThisWorkbook.Sheets("IMPORTATION").[A65536].End(xlUp)(2)
a.Close False
Set a = Nothing
Set donnees = Nothing
Application.CutCopyMode = False
Next i
End With
With ThisWorkbook.Worksheets("IMPORTATION")
.Range([A1], [A65536].End(xlUp)).TextToColumns Range("A1"), xlDelimited, xlDoubleQuote, , , , , , True, ".", FieldInfo:=Array(Array(1, 5), Array(2, 9))
.Rows(1).Delete
End With
Application.ScreenUpdating = True
End Sub