Code vba format telephone portable

Résolu
Bonjour,

Je suis a la recherche du code VBA pour un format téléphone dans une texte box;
Actuellement j'ai ceci comme début de code:
PrivateSubPortable_Change()
End Sub
Je souhaiterais que mon n° s'affiche comme suit: xx/xx/xx/xx/xx
Merci pour votre aide
Cordialement

1 réponse

  1. Contributeur
    Bonjour,

    Voir ceci:

    http://www.excelabo.net/excel/imposer_format_textbox
    1. Contributeur
      Private Sub TextBox1_Change()
      If TextBox1.TextLength = 10 Then
      TextBox1.Value = Format(TextBox1.Value, "00/"" ""00/"" ""00/"" ""00/"" ""00")
      MsgBox "stop"
      End If
      End Sub