Option Explicit
Const OK = " tu ne peux écrire que dans la cellule verte"
Const Nok = "fais un double click dans la cellule verte"
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, [b9]) Is Nothing Then Range("B4") = OK
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With [E5:V32] 'plage à adapter
.Interior.Color = 0 'couleur de fond noir
.Font.ColorIndex = 1 'couleur police noire
If Not Intersect(ActiveCell, .Cells) Is Nothing Then
ActiveCell.Interior.Color = 10092543 'couleur de fond jaune pale
ActiveCell.Font.ColorIndex = xlAutomatic 'couleur police noire
End If
End With
If Not Intersect(Target, [b9]) Is Nothing Then Range("B4") = Nok
End Sub