1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim zone As Range
If Not Intersect(Target, Range("Cartes")) Is Nothing Then
Cells.FormatConditions.Delete
With Target.ListObject
Set zone = .ListRows(Target.Row - .Range.Row).Range
End With
With zone.FormatConditions.Add(xlExpression, Null, "=LIGNE(" & zone.Cells(1).Address(False, False) & ")=" & ActiveCell.Row)
.Interior.Color = 9420794
.Font.Bold = True
zone.Font.Size = 14
End With
Else
Cells.FormatConditions.Delete
End If
End Sub |