Bonjour , je suis très novice en vba et je suis bloqué sur un probleme.je sélectionne 1 ou plusieurs ligne dans une texbox et je les copies a l'aide d'un bouton dans une autre page .mais a chaque fois sa m'efface les ligne déjà mise .je voudrais q'u elles se mette a la suite.
Merci a tous
Private Sub CommandButton5_Click()
Dim LigneDestination As Integer
Dim DernLigne As Long
LigneDestination = 2
For i = 0 To ListBox3.ListCount - 1
If ListBox3.Selected(i) = True Then
With Sheets("Feuil2")
.Cells(LigneDestination, 1) = ListBox3.List(i)
.Cells(LigneDestination, 2) = ListBox3.List(i, 1)
.Cells(LigneDestination, 3) = ListBox3.List(i, 2)
.Cells(LigneDestination, 4) = ListBox3.List(i, 3)
.Cells(LigneDestination, 5) = ListBox3.List(i, 4)
.Cells(LigneDestination, 6) = ListBox3.List(i, 5)
.Cells(LigneDestination, 7) = ListBox3.List(i, 6)
.Cells(LigneDestination, 8) = ListBox3.List(i, 7)
.Cells(LigneDestination, 9) = ListBox3.List(i, 8)
.Cells(LigneDestination, 10) = ListBox3.List(i, 9)
End With
LigneDestination = LigneDestination + 1
End If
Next i
End Sub