Private Sub CmnEditerListeTension_Click()
Dim I As Integer
If Me.ListBoxTension.ListCount = 0 Then
MsgBox "Liste vide, pas de matériel en tension"
Exit Sub
End If
With Sheets("StocksEnTension")
.Range("A2:H10000") = ""
DerlignePlus1 = .Range("A65536").End(xlUp).Row + 1
For I = 0 To Me.ListBoxTension.ListCount - 1
.Range("A" & DerlignePlus1) = Me.ListBoxTension.List(I, 0)
.Range("B" & DerlignePlus1) = Me.ListBoxTension.List(I, 1)
.Range("C" & DerlignePlus1) = Me.ListBoxTension.List(I, 2)
.Range("D" & DerlignePlus1) = Me.ListBoxTension.List(I, 3)
.Range("E" & DerlignePlus1) = Me.ListBoxTension.List(I, 4)
.Range("F" & DerlignePlus1) = Me.ListBoxTension.List(I, 5)
.Range("G" & DerlignePlus1) = Me.ListBoxTension.List(I, 6)
.Range("H" & DerlignePlus1) = Date
DerlignePlus1 = DerlignePlus1 + 1
Next
End With
MsgBox "Edition réalisée"
Application.Goto reference:=Sheets("StocksEnTension").Range("A1"), Scroll:=True
Unload Me
End Sub