Bonsoir KTM, M12, le forum,
Une autre possibilité....
Option Explicit
Private Sub CommandButton1_Click()
If Len(TextBox1) = 15 Then
Range("A1") = TextBox1
TextBox1 = ""
Else
MsgBox "Donnée incomplète"
End If
End Sub
Private Sub TextBox1_Change()
Dim valeur As Byte
TextBox1.MaxLength = 15 'nb caractères maxi autorisé dans le textbox
valeur = Len(TextBox1)
If valeur = 4 Or valeur = 7 Or valeur = 10 Then TextBox1 = TextBox1 & "/"
End Sub
Cordialement,