Jeanvaljean
XLDnaute Nouveau
Salut à tous,
Je souhaite faire un tri sur une plage de données variable, et seule la première ligne ne bénéficie pas de ce tri :
sf lignes de programmation :
Range("A5:L5").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort.SortFields.Add Key:=Range("A5"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort
.SetRange Range("A5:L2000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Comment s'explique cette chose????
Merci pour vos idées!!!!
Jeanvaljean
Je souhaite faire un tri sur une plage de données variable, et seule la première ligne ne bénéficie pas de ce tri :
sf lignes de programmation :
Range("A5:L5").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort.SortFields.Add Key:=Range("A5"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Pièces à fabriquer").Sort
.SetRange Range("A5:L2000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Comment s'explique cette chose????
Merci pour vos idées!!!!
Jeanvaljean