Salut,
Une autre solution :
Private Sub Text1_KeyPress(KeyAscii As Integer)
Static iNbChar As Integer
iNbChar = iNbChar + 1
If iNbChar = 5 Then
Text1.Text = Text1.Text & "-"
Text1.SelStart = Len(Text1.Text)
iNbChar = 0
End If
End Sub
A+
Exploreur
Linux a un noyau, Windows un pépin 