Bonjour,
Simplement en désactivant l'affichage de l'écran durant l'exécution du code.
À la fin du code, l'affichage de l'écran s'actualise.
Il n'est pas nécessaire d'ajouter Application.ScreenUpdating = True à la fin du code, c'est automatique à la fin de l'exécution de la macro.
Sub Tri_Soum_Asc_Couts_Variables()
Dim dlig As Long
Application.ScreenUpdating = False ' Ajout
dlig = Range("H" & Rows.Count).End(xlUp).Row
If dlig < 8 Then dlig = 8
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add2 Key:=Range("CB8:CB" & dlig), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("H8:CF" & dlig)
.Apply
End With
Range("CB3").Select
End Sub
Sub Tri_Soum_Desc_Couts_Variables()
Dim dlig As Long
Application.ScreenUpdating = False ' Ajout
dlig = Range("H" & Rows.Count).End(xlUp).Row
If dlig < 8 Then dlig = 8
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add2 Key:=Range("CB8:CB" & dlig), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("H8:CF" & dlig)
.Apply
End With
Range("CB3").Select
End Sub
ric