Sub mef()
stFichier = Application.GetOpenFilename
tmpStr = Split(stFichier, "\")
nomF = tmpStr(UBound(tmpStr))
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;c:\user\U538819\test\" & nomF, Destination:=Range("$A$1"))
.CommandType = 0
.Name = nomF
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 10
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = "|"
.TextFileColumnDataTypes = Array(9, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Columns("A:A").ColumnWidth = 5.71
End Sub