Claudy
XLDnaute Accro
Bonjour,
dans une procédure, j'utilise pour copier une partie d'un document la procédure .QueryTables.Add(Connection:= ETC....
Cela marche trés bien la première fois, mais aprés elle colle les données dans les colonnes voisines, au lieu de les coller en dessous des autres !
Merci d'avance,
Claudy
Ci dessou mon code:
Sub fidelio1()
zaza = InputBox('Quel fichier ?', , Selection.Value)
With ActiveSheet.QueryTables.Add(Connection:= _
'TEXT;C:\\Documents and Settings\\Weets.C\\Bureaublad\\FacturesFidelio\\' & zaza, Destination:=Range('A1').End(xlUp))
.Name = '050630_1'
.FieldNames = False
.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
End Sub
dans une procédure, j'utilise pour copier une partie d'un document la procédure .QueryTables.Add(Connection:= ETC....
Cela marche trés bien la première fois, mais aprés elle colle les données dans les colonnes voisines, au lieu de les coller en dessous des autres !
Merci d'avance,
Claudy
Ci dessou mon code:
Sub fidelio1()
zaza = InputBox('Quel fichier ?', , Selection.Value)
With ActiveSheet.QueryTables.Add(Connection:= _
'TEXT;C:\\Documents and Settings\\Weets.C\\Bureaublad\\FacturesFidelio\\' & zaza, Destination:=Range('A1').End(xlUp))
.Name = '050630_1'
.FieldNames = False
.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
End Sub