Function copy_from_form_without_repeat_Ref()
Dim LastRowValue As Long
Dim sep As String
sep = Application.DecimalSeparator 'récupère le separateur décimail excel
LastRowValue = ActiveWorkbook.Sheets("Feuil1").Range("A1000000").End(xlUp).Value
TextBox1 = LastRowValue + 1
Dim rng1 As Range
Dim str_search As String
str_search = TextBox2.Value
ActiveWorkbook.Sheets("Feuil1").Activate
Set rng1 = Sheets("Feuil1").Range("B:B").Find(str_search, , xlValues, xlWhole)
If rng1 Is Nothing Then
Dim LastRow As Long
LastRow = ActiveWorkbook.Sheets("Feuil1").Range("A1000000").End(xlUp).Row
LastRow = LastRow + 1
With ActiveWorkbook.Sheets("Feuil1")
.Range("A" & LastRow).Value = TextBox1.Value
.Range("B" & LastRow).Value = CDbl(Replace(TextBox2.Value, ",", sep)) 'remplace la virgule du clavier par le séparateur num, et on transforme le tout en nombre
.Range("C" & LastRow).Value = TextBox3.Value
.Range("D" & LastRow).Value = TextBox4.Value
'.Range("E" & LastRow).Value = TextBox5.Value
'.Range("F" & LastRow).Value = TextBox6.Value
End With
Else
MsgBox str_search & " is Found"
End If
End Function