Private Sub TextBox5_Change()
If IsDate(TextBox5) Then
dnaiss = CDate(TextBox5)
age = Year(Date) - Year(dnaiss)
If (Month(dnaiss) >= Month(Date)) Or (Month(dnaiss) = Month(Date) And Month(dnaiss) > Day(Date)) Then age = age - 1
TextBox19 = age
temp = Application.VLookup(age, [caté], 2, True)
If Not IsError(temp) Then TextBox20 = temp Else TextBox20 = ""
temp = Application.VLookup(age, [caté], 3, True)
If Not IsError(temp) Then TextBox21 = temp Else TextBox21 = ""
End If
End Sub
Private Sub textbox12_Click()
Me.TextBox15 = IIf(Me.textbox12 = True, 10, 0)
CalculTarif
End Sub
Private Sub textbox13_Click()
Me.TextBox16 = IIf(Me.textbox13 = True, 10, 0)
CalculTarif
End Sub
Private Sub TextBox17_Change()
CalculTarif
End Sub
Private Sub TextBox21_Change()
CalculTarif
End Sub
Sub CalculTarif()
Me.TextBox22 = (val(Me.TextBox21) - CDbl(Me.TextBox15) - val(TextBox16)) * (1 - val(TextBox17) / 100)
End Sub