'Private Sub Worksheet_Change(ByVal Target As Range)
'Dim OK As Boolean
'Dim ColRef As Integer
'Dim LigRef As Long
'
' 'Ne gère pas les sélections de plages
' If Target.Cells.Count > 1 Then Exit Sub
' 'Vérifie la présence du format conditionnel "spécial"
' If Target.FormatConditions.Count < 1 Then Exit Sub
' If Target.FormatConditions(1).Formula1 = "=Special" Then
' OK = False
' ColRef = 3
' LigRef = 39
' ColRef = ColRef - 2
' While OK = False
' ColRef = ColRef + 2
' If (UCase(Target.Value) = UCase(Cells(LigRef, ColRef).Value)) Or (Cells(LigRef, ColRef) = "") Then OK = True
' Wend
' Application.EnableEvents = False
' With Target.Interior
' .ColorIndex = Cells(LigRef + 1, ColRef).Interior.ColorIndex
' .Pattern = Cells(LigRef + 1, ColRef).Interior.Pattern
' .PatternColor = Cells(LigRef + 1, ColRef).Interior.PatternColorIndex
' End With
' Application.EnableEvents = True
' End If
'End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("C4:AB34"), Target) Is Nothing Then
Call cre_menu
Select Case Target
Case "Catherine": Target.Interior.ColorIndex = 4
Case "Jacqueline": Target.Interior.ColorIndex = 6
Case "Michèle": Target.Interior.ColorIndex = 39
Case "Stéphanie": Target.Interior.ColorIndex = 7
End Select
End If
End Sub