salut hannoun
regarde avec ceci
Private Sub TextBox1_Change()
If Len(TextBox1) < 1 Then Exit Sub
If Right(TextBox1, 1) = Chr(44) Then
TextBox1 = Left(TextBox1, Len(TextBox1) - 1)
Exit Sub
End If
If Not IsNumeric(TextBox1) Then
TextBox1 = Left(TextBox1, Len(TextBox1) - 1)
Exit Sub
End If
TextBox1.TextAlign = 2
End Sub
et
Private Sub TextBox2_Change()
If Len(TextBox2) < 1 Then Exit Sub
If Not IsNumeric(TextBox2) Then
TextBox2 = Left(TextBox2, Len(TextBox2) - 1)
Exit Sub
End If
If Len(TextBox2) > 14 Then
TextBox2 = Left(TextBox2, 14)
Exit Sub
End If
TextBox2 = Format(TextBox2, "## ## ## ## ##")
End Sub