Private Sub CommandButton1_Click()
Dim compte As String
For i = 1 To ListView1.ListItems.Count
compte = ListView1.ListItems(i).ListSubItems(11).Text
ligne1 = Val(Replace(ListView1.ListItems(i).Key, "K", ""))
With Sheets(compte)
i = .Range("a65536").End(xlUp).Row + 1
Sheets("Echéances").Range("a" & ligne1 & ":o" & ligne1).Copy _
Destination:=.Range("a" & i)
Sheets("Echéances").Range("g" & ligne1).Copy _
Destination:=.Range("s" & i)
End With
Next i
End Sub
Private Sub CommandButton2_Click()
With Sheets("Echéances")
.Range(TextBox1.Tag & ligne1) = TextBox1.Value
.Range(TextBox2.Tag & ligne1) = TextBox2.Value
End With
With ListView1
.ListItems(index1).ListSubItems(8).Text = Replace(TextBox1.Value, ".", ",")
.ListItems(index1).ListSubItems(9).Text = Replace(TextBox2.Value, ".", ",")
End With
CommandButton2.Visible = False
TextBox1.Value = ""
TextBox2.Value = ""
End Sub