Macro tri
nicos
-
Mytå Messages postés 4246 Date d'inscription Statut Contributeur Dernière intervention -
Mytå Messages postés 4246 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
je n'arrive pas à trouver pourquoi mon bouton change de numéro à chaque fois
que je demande le tri.
Je vous joins la macro:
Sub tri()
'
' tri Macro
'
'
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("C1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A1:C100")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveSheet.Buttons.Add(243, 30.75, 50.25, 30).Select
Selection.OnAction = "tri"
End Sub
merci pour votre aide
je n'arrive pas à trouver pourquoi mon bouton change de numéro à chaque fois
que je demande le tri.
Je vous joins la macro:
Sub tri()
'
' tri Macro
'
'
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("C1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A1:C100")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveSheet.Buttons.Add(243, 30.75, 50.25, 30).Select
Selection.OnAction = "tri"
End Sub
merci pour votre aide