Sub statut()
[B][COLOR=royalblue]ActiveSheet.Unprotect 'deverrouillage[/COLOR][/B]
If Intersect(ActiveCell, Range("e8:ai61")) Is Nothing Then
MsgBox "Hors zone"
Else
For Each cellule In Selection
nom = ActiveSheet.Shapes(Application.Caller).Name
Select Case nom
Case "absent" 'si bouton absent cliqué (regarde dans la "zone nom" sur la feuille,
' c'est cette info que la macro cherche et non ce qui est écrit sur le bouton
cellule.Interior.ColorIndex = 3 'applique le code couleur
cellule.Value = "abs" 'je pense que c'est clair
Case "present" 'si bouton present cliqué" etc ....
cellule.Interior.ColorIndex = 0
cellule.Value = ""
Case "formation" '
cellule.Interior.ColorIndex = 32
cellule.Value = "f"
Case "action ext"
cellule.Interior.ColorIndex = 39
cellule.Value = "ext"
Case "maternité"
cellule.Interior.ColorIndex = 15
cellule.Value = "mater"
Case "hors effectif"
cellule.Interior.ColorIndex = 1
cellule.Value = "HS"
Case "tp"
cellule.Interior.ColorIndex = 42
cellule.Value = "TP"
End Select
Next
End If
[COLOR=royalblue][B]ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True 'verrouillage[/B][/COLOR]
End Sub