Sub GENERER_NOUVEAU_FICHIER_IMPORT_CLIENT()
Dim ChDir As String, nmFich As String
ChDir = "CHEMIN CONFIDENTIEL"
nmFich = Sheets("Confidentiel0").Range("X29").Value & ".xlsx"
With ThisWorkbook
AfficheDebloque .Sheets("Confidentiel1"), "MDP"
.Sheets("Confidentiel1").Copy
With ActiveWorkbook
.Sheets(1).Range("A1:DC10000").Value = .Sheets(1).Range("A1:DC10000").Value
'application.displayalerts = false 'si besoin
.SaveAs Filename:=ChDir & nmFich, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
'application.displayalerts = true
.Close
End With
CacheBloque .Sheets("Confidentiel1"), "MDP"
End With
End Sub
Sub AfficheDebloque(Feuille As Worksheet, Optional Password As String)
With Feuille
.Unprotect Password
.Visible = True
End With
End Sub
Sub CacheBloque(Feuille As Worksheet, Optional Password As String)
With Feuille
.Visible = False
.Protect Password
End With
End Sub