Option Explicit
Private Declare Function GetTickCount Lib "Kernel32" () As Long
Sub Minuterie(Milliseconde As Long)
Dim Arret As Long
Arret = GetTickCount() + Milliseconde
Do While GetTickCount() < Arret
DoEvents
Loop
End Sub
Sub Clignote(Cel As Range)
Dim I As Integer
Do Until I = 5
Cel.Interior.ColorIndex = 3
Minuterie 500
Cel.Interior.ColorIndex = 0
Minuterie 500
I = I + 1
Loop
'remets à automatique une fois fini
Cel.Interior.ColorIndex = 0
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
'quand la cellule est sélectionnée (ici A1 et B3, à adapter)
'elle clignote pendant 5 secondes
Select Case Target.Column
Case 1
If (Target.Value <> "") And (Target.Offset(0, 1) <> "") Then
If Target.Value < Target.Offset(0, 1) Then Clignote Target.Offset(0, 1)
End If
Case 2
If (Target.Value <> "") And (Target.Offset(0, -1) <> "") Then
If Target.Value > Target.Offset(0, -1) Then Clignote Target
End If
End Select
End Sub