Private Sub ListBox1_Change()
If flag Then Exit Sub 'variable Public dans Module1
Dim i&, x$, v
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
x = x & ", " & .List(i)
v = v + Application.Index(Evaluate(.ListFillRange).Columns(2), i + 1)
End If
Next
End With
[D6] = Mid(x, 3)
[F6] = v
End Sub
Private Sub ListBox2_Change()
If flag Then Exit Sub 'variable Public dans Module1
Dim i&, x$, v
With ListBox2
For i = 0 To .ListCount - 1
If .Selected(i) Then
x = x & ", " & .List(i)
v = v + Application.Index(Evaluate(.ListFillRange).Columns(2), i + 1)
End If
Next
End With
[D7] = Mid(x, 3)
[F7] = v
End Sub