1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Private Sub TextBox11_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Select Case TextBox7
Case 90 To 179
Select Case TextBox3
Case 31 To 100
If CDbl(TextBox11) > 0.5 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 0,5"
TextBox11 = ""
Exit Sub
End If
Case 101 To 500
If CDbl(TextBox11) > 1.25 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 1,25"
TextBox11 = ""
Exit Sub
End If
Case 501 To 3000
If CDbl(TextBox11) > 1.5 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 1,5"
TextBox11 = ""
Exit Sub
End If
Case 3001 To 5000
If CDbl(TextBox11) > 1.6 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 1,6"
TextBox11 = ""
Exit Sub
End If
End Select
Case 180 To 359
Select Case TextBox3
Case 0 To 100
If CDbl(TextBox11) > 0.7 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 0,7"
TextBox11 = ""
Exit Sub
End If
Case 101 To 500
If CDbl(TextBox11) > 1.3 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 1,3"
TextBox11 = ""
Exit Sub
End If
Case 501 To 3000
If CDbl(TextBox11) > 1.6 Then
MsgBox "Dépassement de la grille, le taux doit être inférieur à 1,6"
TextBox11 = ""
Exit Sub
End If
End Select
End Select
End Sub |
Partager