Bonjour,
Je voudrais savoir comment modifier un peu ce code. Car quand je lance on voit les actions car c est une macro que jai record. Comment rendre les actions plus discrete par exemple ne pas voir la selection du tableau etc.
Et comment supprimer l effet de bouche?
Sub macro_tri()
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Add Key:=Range("H6:H1000") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Add Key:=Range("M6:M1000") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("prod").Sort
.SetRange Range("A5:V1000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("K6:K1000").Select
Selection.ClearContents
End Sub
Je voudrais savoir comment modifier un peu ce code. Car quand je lance on voit les actions car c est une macro que jai record. Comment rendre les actions plus discrete par exemple ne pas voir la selection du tableau etc.
Et comment supprimer l effet de bouche?
Sub macro_tri()
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Add Key:=Range("H6:H1000") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("prod").Sort.SortFields.Add Key:=Range("M6:M1000") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("prod").Sort
.SetRange Range("A5:V1000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("K6:K1000").Select
Selection.ClearContents
End Sub