Private Sub CommandButton1_Click() With Sheets("Feuil3") derlign = .Range("A" & Rows.Count).End(xlUp).Row .Range("A" & derlign).Copy Destination:=.Range("A" & derlign + 1) derlign = derlign + 1 .Range("A" & derlign).EntireRow.ClearContents .Range("A" & derlign).Value = Me.TextBox1.Value 'classement par ordre alphabétique .Sort.SortFields.Clear .Sort.SortFields.Add Key:=Range("A1"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal End With With Sheets("Feuil3").Sort .SetRange Range("A2:A" & derlign) .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question