Boucle pour ecrire plusieur ligne dans une textbox

bonsoir

je voudrais pouvoir écrire plusieur fois dans une text box sans effacer ce qui était précédemment inscrit

voici le code que j'ai tapé :

Private Sub ComboBox1_Change()

With Worksheets("F1")

DERNIERE = .Range("A65536").End(xlUp).Row + 1

For i = 2 To DERNIERE

If Feuil4.Cells(i, 3) = ComboBox1 Then

TextBox1 = Feuil4.Cells(i, 8) & vbCrLf

End If

Next

End With

End Sub

a chaque fois je n'est que la dernière ligne dans ma textbox

merci

Bonjour

A tester

Private Sub ComboBox1_Change()
  TextBox1 = ""
  With Worksheets("F1")
    DERNIERE = .Range("A65536").End(xlUp).Row + 1
    For i = 2 To DERNIERE
      If Feuil4.Cells(i, 3) = ComboBox1 Then
        TextBox1 = TextBox1 & Feuil4.Cells(i, 8) & vbCrLf
      End If
    Next
  End With
End Sub

bonjour banzai

désolé d'avoir mis autant de temps pour répondre ,merci beaucoup ta solution fonctionne tres bien

encore merci

cordialement.

Rechercher des sujets similaires à "boucle ecrire ligne textbox"