Sub UpdateTextBox()
'Déclarations
Dim lastLine, I As Long
'Liaison des valeurs des textbox avec les combobox "cboITEM" et "cboCR"
With Sheets("DATA_STOCK")
' lastLine = .Range("A3").End(xlDown).Row
'ne prend pas en compte la dernière ligne
'Modifié par
lastLine = .Cells(.Rows.Count, "A").End(xlUp).Row
Me.txtQDISPO = 0 ' pour pouvoir calculer **Ajouté
For I = 1 To lastLine
If .Range("L" & I).Value = cboADRESS.Value Then 'filtre par Adresse
If .Range("A" & I).Value = cboITEM.Value Then 'filtre par code article
If .Range("e" & I).Value = Me.cboCR.Value Then 'filtre par code CR ' **ajouté
txtDLP.Value = .Range("D" & I).Value
Me.txtQDISPO.Value = Me.txtQDISPO.Value + .Range("I" & I).Value ' **ajouté
txtUNIT.Value = .Range("K" & I).Value
txtBLOCKED.Value = .Range("J" & I).Value
End If
End If
End If
Next I
End With
End Sub