Bonjour
Voila une solution a voir
Private Sub UserForm_Initialize()
TextBox9.EnterKeyBehavior = True
TextBox9.MultiLine = True
End Sub
Private Sub TextBox9_Change()
Dim T, S
S = TextBox9
If Right(S, 1) = Chr(10) Then
S = TextBox9
If Mid(S, 1, 2) = Chr(45) & " " Then S = Mid(S, 3)
S = Replace(S, Chr(45) & " ", "")
T = Split(S, Chr(10))
TextBox9 = Chr(45) & " " & Join(T, Chr(45) & " ")
TextBox9.SelStart = Len(TextBox9)
ElseIf Mid(S, 1, 2) <> Chr(45) & " " Then
S = Chr(45) & " " & S
TextBox9 = S
TextBox9.SelStart = Len(TextBox9)
End If
End Sub
A+
Maurice