Private Sub ComptHeure_Click()
Dim TtlHeures As Integer
With Sheets("Calendrier")
For Each cel In Range("F:F").SpecialCells(xlCellTypeConstants)
cel.Select
If CStr(cel.Value) = ComboBox1.Value And UCase(cel.Offset(0, 1).Value) = "X" Then
TtlHeures = TtlHeures + cel.Offset(0, -1)
End If
Next
End With
MsgBox "Imputation : " & ComboBox1.Value & vbCrLf & "Total heures non validées : " & TtlHeures
End Sub