Private Sub valider_piece_specifique_click()
Dim volume_piece As Double
Dim nom_piece As String
Dim PlageILN2 As Range
Dim RangeObj As Range
'.Cells(20, der_colonne).Value = Sheets("Amont ILN").Cells(ComboBox_ILN.ListIndex + 2, 2)
'Récupération du volume de la pièce
nom_piece = ComboBox_pieces_specifiques.Value
volume_piece = Sheets("Bilan Volume").Cells(ComboBox_pieces_specifiques.ListIndex + 3, 2)
'Ajout du volume de la pièce dans le cas où ILN est sélectionné
If CheckBox_ILN_specifiques.Value = True Then 'si la case ILN est cochée
If ComboBox_ILN_specifiques = "" Then MsgBox "Il faut selectionner un ILN": Exit Sub
With Sheets("Synthèse")
Set PlageILN2 = .Range(.Cells(16, 2), .Cells(16, .Cells(17, 256).End(xlToLeft).Column))
End With
Set RangeObj = PlageILN2.Find(what:=ComboBox_ILN_specifiques.Text, LookIn:=xlValues, LookAt:=xlPart)
If Not RangeObj Is Nothing Then
[color=red]RangeObj.Offset(2, 0).Value = RangeObj.Offset(2, 0).Value + volume_piece[/color]
End If
End If
End Sub