1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| 'Pour le bouton Nouvelle Fiche
Private Sub CommandButton1_Click()
Dim L As Integer
If MsgBox("Confirmez-vous l'insertion de ce nouvelle fiche ?", vbYesNo, "Demande de confirmation d'ajout") = vbYes Then
L = Sheets("NUM").Range("a65536").End(xlUp).Row + 1 'Pour placer le nouvel enregistrement ? la première ligne de tableau non vide
Range("A" & L).Value = ComboBox1
Range("B" & L).Value = ComboBox2
Range("C" & L).Value = ListBox1
Range("D" & L).Value = ListBox2
Range("E" & L).Value = ListBox3
Range("F" & L).Value = ListBox4
Range("G" & L).Value = ListBox5
Range("H" & L).Value = ListBox6
Range("I" & L).Value = ListBox7
Range("J" & L).Value = ListBox8
Range("K" & L).Value = ListBox9
Range("L" & L).Value = ListBox10
End If
End Sub |
Partager