Sub copy()
Application.ScreenUpdating = False
Worksheets("F1").Visible = True
Range("TabloF1").ClearContents
Sheets("BDD").Select
Range("Tablo").Select
Selection.Copy
Sheets("F1").Activate
Range("B8").Select
ActiveSheet.Paste
Application.CutCopyMode = False
'Call create_new_file
Application.ScreenUpdating = True
'Worksheets("F1").Visible = False
End Sub
Sub create_new_file()
Dim Nom As Variant
Application.ScreenUpdating = False
Sheets("F1").Activate
Nom = "Paris_" & Range("L9").Value
Workbooks.Add
ChDir ThisWorkbook.Path
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & Nom & ".xlsx", FileFormat:= _
xlOpenXMLWorkbook, CreateBackup:=False
ThisWorkbook.Sheets("F1").Copy Before:=Workbooks(Nom & ".xlsx").Sheets(1)
'pour vidercontent
Range("p9:P100, R9:R100,S9:S100,T9:T100,U9:U100,V9:V100").ClearContents
'pour masquer
Range("Q:Q,W:W,X:X").EntireColumn.Hidden = True
'pour securisation
Range("D9:D100,H9:H100,N9:N100").Locked = True
FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingRows:=True, AllowFiltering:=True, Password:="0000"
ActiveSheet.EnableSelection = xlNoRestrictions
Workbooks(Nom & ".xlsx").Close SaveChanges:=True
Sheets("BDD"").Activate
Application.ScreenUpdating = True
MsgBox ("Fichier enregistré !")
End Sub