Private Sub CommandButton1_Click()
Dim L As Long
For I = 1 To 4
If Me.Controls("Textbox_date_" & I) <> "" Then
L = [Tableau1].ListObject.ListRows.Add.Index
[Tableau1[date]].Rows(L) = Controls("Textbox_date_" & I)
[Tableau1[unité]].Rows(L) = Controls("Textbox_unite_" & I)
[Tableau1[titre]].Rows(L) = Controls("Textbox_titre_" & I)
[Tableau1[designation]].Rows(L) = Controls("Textbox_designation_" & I)
[Tableau1[quantité]].Rows(L) = Controls("Textbox_quantite_" & I)
End If
Next
Unload Me
End Sub
Private Sub CommandButton1_Click()
Dim L As Long
For I = 1 To 4
If Me.Controls("Textbox_date_" & I) <> "" Then
L = [Tableau1].ListObject.ListRows.Add.Index
[Tableau1[date]].Rows(L) = Controls("Textbox_date_" & I)
[Tableau1[unité]].Rows(L) = Controls("Textbox_unite_" & I)
[Tableau1[titre]].Rows(L) = Controls("Textbox_titre_" & I)
[Tableau1[designation]].Rows(L) = Controls("Textbox_designation_" & I)
[Tableau1[quantité]].Rows(L) = Controls("Textbox_quantite_" & I)
End If
Next
Unload Me
End Sub