1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Private Sub CommandButton4_Click()
Dim no_ligne As Integer
Sheets("BD").Select
no_ligne = ComboBox1.ListIndex + 2
If ComboBox1.Value = "" Then
MsgBox ("Veuillez remplir le champ de la recherche")
Else
Cells(no_ligne, 2) = Date & " " & Time
Cells(no_ligne, 4) = TextBox1.Value
Cells(no_ligne, 3) = TextBox2.Value
Cells(no_ligne, 5) = TextBox3.Value
Cells(no_ligne, 8) = TextBox4.Value
Cells(no_ligne, 17) = TextBox5.Value
Cells(no_ligne, 17) = Format(TextBox5.Value, "#0,00")
Cells(no_ligne, 6) = TextBox6.Value
Cells(no_ligne, 7) = TextBox7.Value
Cells(no_ligne, 13) = TextBox8.Value
Cells(no_ligne, 12) = TextBox9.Value
Cells(no_ligne, 14) = TextBox10.Value
Cells(no_ligne, 15) = TextBox11.Value
Cells(no_ligne, 16) = TextBox12.Value
Cells(no_ligne, 18) = TextBox13.Value
Cells(no_ligne, 20) = TextBox14.Value
Cells(no_ligne, 21) = TextBox15.Value
Cells(no_ligne, 1) = TextBox16.Value
Cells(no_ligne, 9) = TextBox17.Value
TextBox17.Value = Format(TextBox17.Value, "dd/mm/yyyy")
Cells(no_ligne, 10) = TextBox18.Value
Cells(no_ligne, 11) = TextBox19.Value
TextBox19.Value = Format(TextBox19.Value, "dd/mm/yyyy")
Cells(no_ligne, 26) = TextBox20.Value
End If
End Sub |
Partager