Private Sub TextBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = IIf(LCase(TextBox2) = "oui", "non", "oui")
End Sub
Private Sub TextBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3 = IIf(LCase(TextBox3) = "oui", "non", "oui")
End Sub
Private Sub TextBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
c_est_oui_ou_non TextBox2
End Sub
Private Sub TextBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
c_est_oui_ou_non TextBox3
End Sub
Sub c_est_oui_ou_non(ByRef TXTB As MSForms.TextBox)
TXTB = Array("oui", "non")(Abs(LCase(TXTB) = "oui"))
End Sub
Private Sub TextBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With TextBox2
.Text = IIf(LCase(.Text) = Empty, "oui", IIf(.Text = "oui", "non", Empty))
End With
End Sub
Private Sub TextBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With TextBox3
.Text = IIf(LCase(.Text) = Empty, "oui", IIf(.Text = "oui", "non", Empty))
End With
End Sub
Private Sub TextBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
c_est_oui_ou_non2 TextBox2
End Sub
Private Sub TextBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
c_est_oui_ou_non2 TextBox3
End Sub
Sub c_est_oui_ou_non2(ByRef TXTB As MSForms.TextBox)
dim Resp$
Resp = "ouinonoui"
TXTB = Mid(resp, InStr(1, resp, TXTB) + 3, 3)
End Sub
TextBox2 = IIf(LCase(TextBox2) = "oui", "non", "oui")
.Text = IIf(LCase(.Text) = Empty, "oui", IIf(.Text = "oui", "non", Empty))
Parce qu'on compare la chaîne avec "oui" qui est en minuscules...@ job75 et Jean Marie : petite question : Pourquoi convertir en minuscule la chaîne contenue dans les TextBoxs ?
Bah il suffit d'appuyer sur la touche Suppr...On peut aussi se conserver la possibilité de mettre à Vide Lol