Sub SemaineBleue()
couleur (5)
End Sub
Sub SemaineBlanche()
couleur (2)
End Sub
Sub SemaineRouge()
couleur (3)
End Sub
Sub couleur(n As Byte)
Dim Sh As Worksheet, Ad As String
Application.ScreenUpdating = False
For Each Sh In Worksheets
[B]Sh.Unprotect Password:="toto"[/B]
If Left(Sh.Name, 1) = "P" Then Ad = "B8:B18" Else Ad = "B9:B19"
Sh.Range(Ad).Font.ColorIndex = n
[B]Sh.Protect Password:="toto"[/B]
Next
End Sub
Sub EffacerLaSemaine()
Application.ScreenUpdating = False
Dim Sh As Worksheet, C As Range, Ad As String
Application.ScreenUpdating = False
For Each Sh In Worksheets
[B]Sh.Unprotect Password:="toto"[/B]
If Left(Sh.Name, 1) = "P" Then Ad = "B8:Q31" Else Ad = "B9:Q32"
For Each C In Sh.Range(Ad)
If C.Locked = False Then C.ClearContents
Next
[B]Sh.Protect Password:="toto"[/B]
Next
End Sub