slut
j'ai 3 textbox
textbox3 :montant recouvre
textbox7 :montant indemnise
textbox8 :"non" ou "oui"
textbox9 :situation
j'ai fait ce code mais ça marche pas pour les 3 conditions:
Private Sub TextBox3_Change()
If TextBox3 = 0 Then
TextBox8 = "non"
TextBox9 = "A Recouvrir"
TextBox9.BackColor = vbRed
End If
If TextBox3 >= TextBox7 Then
TextBox8 = "oui"
TextBox9 = "Restitution"
TextBox9.BackColor = vbWhite
End If
If TextBox3 < TextBox7 Then
TextBox8 = "partiel"
TextBox9 = "Montant partiel"
TextBox9.BackColor = vbGreen
End If
End Sub
j'ai 3 textbox
textbox3 :montant recouvre
textbox7 :montant indemnise
textbox8 :"non" ou "oui"
textbox9 :situation
j'ai fait ce code mais ça marche pas pour les 3 conditions:
Private Sub TextBox3_Change()
If TextBox3 = 0 Then
TextBox8 = "non"
TextBox9 = "A Recouvrir"
TextBox9.BackColor = vbRed
End If
If TextBox3 >= TextBox7 Then
TextBox8 = "oui"
TextBox9 = "Restitution"
TextBox9.BackColor = vbWhite
End If
If TextBox3 < TextBox7 Then
TextBox8 = "partiel"
TextBox9 = "Montant partiel"
TextBox9.BackColor = vbGreen
End If
End Sub