Re bonjour.... :huh:
j'ai bricollé et c'est presque ok, seulement lorsque j'exécute la macro (un peu longue) cidessous, le première fois c'est ok, mais lorsque je change de fichier, tout est décaler à droite de mon tableau d'origine!
Sub fidelio1()
zaza = InputBox('Quel fichier ?', , '050809')
'SI JE CHANGE DE FICHIER, ç a bUG
With ActiveSheet.QueryTables.Add(Connection:= _
'TEXT;C:\\Documents and Settings\\Weets.C\\Bureaublad\\FacturesFidelio\\' & zaza & '.PRN', _
Destination:=Range('B64000').End(xlUp)(2))
.Name = '050630_1'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 11
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(13, 8, 20, 28, 4, 9, 2, 11, 11, 5, 8)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range(Range('B2').End(xlDown), Range('B2').End(xlDown).Offset(3, 0)).EntireRow.Delete
End Sub
Merci, et a+