Private Sub MajInventaire()
Dim v As Integer
With Worksheets("Inventaire")
lgD = .Cells(Rows.Count, 1).End(xlUp).Row + 1
For v = 0 To ListBox1.ListCount - 1
With .Cells(lgD, 3)
If flgAdd = 0 Then
.Offset(, -2) = ListBox1.List(v, 1) 'Code article
.Offset(, -1) = ListBox1.List(v, 4) 'Catégorie
.Offset(, 2) = ListBox1.List(v, 5) 'Seuil d'alerte
.Offset(, 3) = ListBox1.List(v, 6) 'Descriptif
.Offset(, 4) = ListBox1.List(v, 7) 'Référence
.Offset(, 5) = ListBox1.List(v, 8) 'Unité de mesure
.Offset(, 6) = "Transfert" 'Observations
.Offset(, 9) = ComboBox2 'Magasin
QD = Val(.Value) + QT: .Value = QD 'Stock actuel
Else
.Offset(, 7) = .Offset(, 7) + ListBox1.List(v, 9)
End If
lgT = lgT + 1
End With
.Protect
Next v
End With
End Sub