Private Sub TextBox1_Change()
Application.enableevents = false
if not isnumeric(textbox1.text) then
TextBox1.Text = replace(TextBox1.Text," ","") 'refuse les espaces
If Len(TextBox1.Text) = 4 Then TextBox1.Text = Format(TextBox1.Text, ">") & "."
If Len(TextBox1.Text) = 6 Then TextBox1.Text = Format(TextBox1.Text, ">")
If Len(TextBox1.Text) = 8 Then TextBox1.Text = Left(TextBox1.Text, 6) & Format(Right(TextBox1.Text, 2), "<") & "."
If Len(TextBox1.Text) > 9 Then TextBox1.Text = Left(TextBox1.Text, 9)
end if
Application.enableevents = true
End Sub