Private Sub CBn_Valider_Click()
If CBox_MotifAbsence.ListIndex = -1 Then CBox_MotifAbsence = "": CBox_MotifAbsence.SetFocus: Exit Sub
If CBox_DateMotifDebut.Visible And CBox_DateMotifDebut.ListIndex = -1 Then CBox_DateMotifDebut = "": CBox_DateMotifDebut.SetFocus: Exit Sub
If CBox_DateMotifFin.ListIndex = -1 Then CBox_DateMotifFin = "": CBox_DateMotifFin.SetFocus: Exit Sub
Dim deb, fin, temp, c As Range
If CBox_DateMotifDebut.Visible Then deb = CLng(CDate(CBox_DateMotifDebut)) Else deb = CLng(CDate(CBox_DateMotifFin))
fin = CLng(CDate(CBox_DateMotifFin))
If deb > fin Then temp = deb: deb = fin: fin = temp
With Sheets("CRT")
Set c = .Cells(Application.Match(deb, .Columns("A"), 0), "I")
c.Resize(fin - deb + 1) = CBox_MotifAbsence
c.Select
End With
End Sub