Sub Sauvegarde()
ActiveSheet.Unprotect 'Désactive la protection
ActiveSheet.Shapes("AutoShape 90").Select 'Masque le bouton de sauvegarde
Selection.ShapeRange.ZOrder msoSendToBack
MsgBox ("Bonjour ") & Environ("username") & (" ,tu vas créer une sauvegarde de cette feuille 'Calendrier'") 'Affiche une Box avec message
Dim Nouveaufichier As String
ActiveSheet.Copy
With ActiveSheet
.Cells.Copy
.Cells.PasteSpecial xlPasteValues
Application.ErrorCheckingOptions.NumberAsText = False 'retire l'option Nb stoké en tant que texte
End With
Nouveaufichier = Application.GetSaveAsFilename
ActiveWorkbook.SaveAs Nouveaufichier & "xls"
MsgBox ("La Feuille 'Calendrier' as été créé et fermé ")
ActiveWorkbook.Close 'Ferme le fichier EXCEL créé
ActiveSheet.Shapes("AutoShape 90").Select 'Affiche le bouton de sauvegarde
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True 'Active la protection de la feuille
End Sub