Private Sub CommandButton2_Click()
Dim nextrow As Integer
'=COUNTA(A:A)+1
nextrow = WorksheetFunction.CountA(Sheets("Liste").Range("A:A")) + 1
Sheets("Liste").Cells(nextrow, 1) = Now
Sheets("Liste").Cells(nextrow, 2) = UserForm1.ComboBoxTestbench.Value
Sheets("Liste").Cells(nextrow, 3) =
UserForm1.TextBox1.Value (calendar date "from")
Sheets("Liste").Cells(nextrow, 4) =
UserForm1.TextBox2.Value (calendar date "to")
Sheets("Liste").Cells(nextrow, 5) = UserForm1.TextBox4Abt.Value
Sheets("Liste").Cells(nextrow, 6) = UserForm1.TextBox3Name.Value
Sheets("Liste").Cells(nextrow, 7) = UserForm1.TextBox6Email.Value
Sheets("Liste").Cells(nextrow, 8) = UserForm1.ComboBox2Kompo.Value
Sheets("Liste").Cells(nextrow, 9) = UserForm1.TextBox5SAP.Value
Sheets("Liste").Cells(nextrow, 10) = UserForm1.TextKurzbeschreibung.Value
Unload UserForm1
End Sub
Bookmarks