Private Sub CommandButton1_Click()
Dim ws_Cycle_M1 As Worksheet
Set ws_Cycle_M1 = ActiveWorkbook.Worksheets("Cycle_Vie_M1")
fin_liste_Cycle_M1 = ws_Cycle_M1.Range("A65533").End(xlUp).Row
Nom_Lame = UF_Ajout_Lame_M1.ListBox1.List(UF_Ajout_Lame_M1.ListBox1.ListIndex, 0)
Dim sCol!
Dim Y%, X%
sCol = 3 + (UF_Ajout_Lame_M1.ListBox1.ListIndex * 5)
Dim Plage As Range
Set Plage = ws_Cycle_M1.Range("C2:C" & sCol)
Nom_Lame = UF_Ajout_Lame_M1.ListBox1.List(UF_Ajout_Lame_M1.ListBox1.ListIndex, 0)
Set Trouve = Plage.Cells.Find(what:=Nom_Lame, lookat:=xlWhole)
If Trouve Is Nothing Then
With Worksheets("Cycle_Vie_M1")
For X = 2 To .Cells(Rows.Count, sCol).End(xlUp).Row
.Cells(X, sCol) = Nom_Lame
.Cells(X, sCol + 1) = Me.TextBox_Long.Value
.Cells(X, sCol + 2) = Me.ComboBox_Tens.Value
.Cells(X, sCol + 3) = Me.ComboBox_Type.Value
.Cells(X, sCol + 4) = Me.ComboBox_Nomb.Value
Next X
End With
End If
Unload Me
End Sub