Sub Test()
Dim Sh As Worksheet, Psw As String
Psw = "toto"
With Workbooks.Open("D:\.................\1.xlsm")
Set Sh = .Worksheets("Archive")
With Sh
.Activate
.Unprotect Psw
ThisWorkbook.Worksheets("feuilorigine").Range("A27:S27").Copy
.Range("A6000").PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Range("A6000").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
With .Sort
.SortFields.Clear
.SortFields.Add Key:=Sh.Range("A5:A17"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Sh.Range("A5:T6000")
.Header = xlGuess: .MatchCase = False
.Orientation = xlTopToBottom: .SortMethod = xlPinYin
.Apply
End With
.Protect Psw, DrawingObjects:=True, Contents:=True, Scenarios:=True
End With
Set Sh = Nothing
.Close True
End With
End Sub