1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Private Sub Command_Ajout_Click()
Dim ligne As Integer
ligne = 12
Dim ligneFree As Integer
ligneFree = -1
With Sheets("Feuil1")
Do Until ligneFree <> -1
If (.Cells(ligne, 1).Value = "") Then
ligneFree = ligne
End If
ligne = ligne + 1
Loop
Dim i As Integer
For i = 0 To Liste1.ListCount - 1
If (Liste1.Selected(i) = True) Then
Sheets("Feuil1").Cells(ligneFree, 1).Value = Liste1.List(i)
End If
Next
Dim j As Integer
For j = 0 To Liste2.ListCount - 1
If (Liste2.Selected(j) = True) Then
Sheets("Feuil1").Cells(ligneFree, 2).Value = Liste2.List(j)
End If
Next
'''etc....
End With
End Sub |