Re : Détecter un retour à la ligne automatique.
J'ai trouvé une solution si c'est toujours d'actualité. ^__^
texte saisi dans un textbox retranscrit dans des cellules en fonction de curline
Dim i As Long, lg As Long, x As Long, y As Long, lg2 As Long
Me.TextBox1.SetFocus
For i = 1 To Len(Me.TextBox1)
Me.TextBox1.SelStart = i
lg = Me.TextBox1.CurLine
Next i
For x = 0 To lg
For i = 1 To Len(Me.TextBox1)
Me.TextBox1.SelStart = i
lg2 = Me.TextBox1.CurLine
If lg2 = x Then Range("A1").Offset(y, 0) = Range("A1").Offset(y, 0) & Mid(Me.TextBox1, i, 1)
Next i
If Range("A1").Offset(y + 1, 0) = "" And Range("A1").Offset(y + 1, 0).Locked = False Then y = y + 1
Next x