Bonjour Chris,
En utilisant ta proposition, ça peut se modifier comme suit :
Je ne mets pas en doute les actions codifiées dans ton code
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
a = ActiveSheet.Range("A4").ListObject.Name
b = ActiveSheet.Name
If Not Application.Intersect(Target, Range("A3")) Is Nothing Then
'ActiveSheet.Name = Target
End If
ActiveSheet.ListObjects(a).Range.AutoFilter Field:=4, Criteria1:= _
Array("C", "CS", "F", "H", "HS", "M", "O", "P", "RF", "VA/HS"), Operator:= _
xlFilterValues
ActiveWorkbook.Worksheets(b).ListObjects(a).Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets(b).ListObjects(a).Sort.SortFields. _
Add2 Key:=Range("Tableau2[[#All],[O/F]]"), SortOn:=xlSortOnValues, Order _
:=xlAscending, CustomOrder:="o,f,c,cs,hs,ss,rf,m,VA/HS", DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets(b).ListObjects(a).Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
a+