Bonjour à tous.
a la sortie de ma textbox après avoir saisie 10.50, celle-ci m'affiche 0,45.
Voici le code de ma textbox :
Private Sub TextBox15_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox15.Value = Format(TextBox15.Value, "# ##0.00")
End Sub
Private Sub TextBox15_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If InStr("1234567890.-", Chr(KeyAscii)) = 0 Or TextBox15.SelStart > 0 And Chr(KeyAscii) = "-" _
Or InStr(TextBox15.Value, ".") <> 0 And Chr(KeyAscii) = "." Then KeyAscii = 0: Beep
End Sub
Merci de m'aider svp.
a la sortie de ma textbox après avoir saisie 10.50, celle-ci m'affiche 0,45.
Voici le code de ma textbox :
Private Sub TextBox15_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox15.Value = Format(TextBox15.Value, "# ##0.00")
End Sub
Private Sub TextBox15_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If InStr("1234567890.-", Chr(KeyAscii)) = 0 Or TextBox15.SelStart > 0 And Chr(KeyAscii) = "-" _
Or InStr(TextBox15.Value, ".") <> 0 And Chr(KeyAscii) = "." Then KeyAscii = 0: Beep
End Sub
Merci de m'aider svp.