Bonjour,
Une proposition ?
Public Sub heure()
Dim I As Byte, ACell As Range
Const R As String = "B4:B203"
Set ACell = ActiveCell
If Not IsEmpty(ACell.Offset(, 1)) And Not IsEmpty(ACell.Offset(, 2)) Then
MsgBox ("Ce coureur est d?j? pass?"), vbOKOnly + vbCritical, "Alerte"
For I = 1 To 3
Beep
Next I
Else
If IsEmpty(ACell.Offset(0, 1)) Then
With ACell.Offset(0, 1)
.Value = Time
.NumberFormat = "hh:mm:ss"
End With
ActiveSheet.Range(R).Interior.ColorIndex = xlNone
ACell.Resize(, 2).Interior.ColorIndex = 36
Else
With ACell.Offset(0, 2)
.Value = Time
.NumberFormat = "hh:mm:ss"
End With
ACell.Resize(, 3).Interior.ColorIndex = 38
End If
End If
ActiveSheet.Cells(4, 2).Select
End Sub