Sub ConvertToActiveWorkbook()
Dim iBook As Workbook
Dim iTexts As Workbook
Dim iSheet As Worksheet
Dim fichier_choisi$
Dim lr&
Dim lc&
Set iBook = ThisWorkbook
Set iSheet = iBook.Sheets.Add
fichier_choisi = Application.GetOpenFilename("Text Files (*.txt), *.txt", , "Sélectionner le fichier TXT")
Set iTexts = Workbooks.Open(fichier_choisi)
iTexts.Sheets(1).Cells.Copy iSheet.Cells
iTexts.Close SaveChanges:=True
lr = iBook.Sheets(1).Cells(Rows.Count, 1).End(xlUp).Row
lc = iBook.Sheets(1).Cells(1, Cells.Columns.Count).End(xlToLeft).Column
iBook.Sheets(1).ListObjects.Add(xlSrcRange, Range(Cells(1, 1), Cells(lr, lc)), , xlYes).Name = "Tableau"
End Sub