Private Sub Workbook_Open()
'La touche F1 colorie en jaune, la touche F3 en blanc
Application.OnKey "{F1}", "ThisWorkbook.jaune"
Application.OnKey "{F3}", "ThisWorkbook.blanc"
End Sub
Sub jaune() 'Couleur jaune
ActiveCell.Activate 'au cas où un objet serait sélectionné
Selection.Interior.ColorIndex = 6
If Not Intersect(Selection, [A:A]) Is Nothing Then _
Intersect(Intersect(Selection, [A:A]).EntireRow, [C:C]).Interior.ColorIndex = 6
End Sub
Sub blanc() 'Couleur blanche
ActiveCell.Activate 'au cas où un objet serait sélectionné
Selection.Interior.ColorIndex = 2 'pourquoi pas = xlNone ???
If Not Intersect(Selection, [A:A]) Is Nothing Then _
Intersect(Intersect(Selection, [A:A]).EntireRow, [C:C]).Interior.ColorIndex = 2
End Sub