Sub Exporter()
Dim RgExtraction As Range, DerLgn As Long
Application.ScreenUpdating = False
'Copie de la feuille Extraction vers un nouveau classeur
Sh_Extraction.Copy
With ActiveSheet
'Effacement des formules
.UsedRange.Cells.Value = .UsedRange.Cells.Value
'Effacement des boutons
.Shapes("Btn_Imprimer").Delete
.Shapes("Btn_Exporter").Delete
'Effacement des validations de données
.[A1:A2].Validation.Delete
'Effacement du nom défini servant pour les validations de données
.Parent.Names("CTP_list").Delete
'Tri du tableau extrait
DerLgn = .Cells(.Rows.Count, 2).End(xlUp).Row
Set RgExtraction = Range(.Cells(3, 2), .Cells(DerLgn, 12))
With .Sort
.SortFields.Clear
.SortFields.Add2 Key:=RgExtraction.Columns(7), SortOn:=xlSortOnValues, Order:=xlAscending
.SetRange RgExtraction
.Header = xlYes
.Apply
End With
'Aller sur le tableau extrait
Application.Goto .[A1], Scroll:=True '(haut de la feuille)
ActiveWindow.Zoom = 80
Application.Goto RgExtraction '(tableau extrait)
End With
Application.ScreenUpdating = True
End Sub