Sub Macro1()
Dim f As Worksheet, fichier As String, chemin As String
Application.ScreenUpdating = False
chemin = ActiveWorkbook.Path & "\Stables\"
If Dir(chemin, vbDirectory) = "" Then MkDir chemin
fichier = "Statut.xlsx"
Set f = ActiveWorkbook.Worksheets("St2")
With f
.Visible = True
.Unprotect "mdp", userinterfaceonly:=True
.Range("A1:P42").Copy
End With
Workbooks.Add (xlWBATWorksheet)
With ActiveWorkbook
With .Worksheets(1).Cells(3, 1)
.PasteSpecial Paste:=xlPasteValues
.PasteSpecial Paste:=xlPasteFormats
End With
Application.CutCopyMode = False
.SaveAs chemin & fichier, 51
.Close
End With
End Sub