Private
Sub
Button_ok_Click()
If
TextBox_Name =
""
Then
MsgBox
"Du musst einen Namen eintragen!"
Unload UserForm1
Else
MsgBox
"Kundendaten wurden erfolgreich gespeichert"
Dim
last
As
Integer
last = ActiveSheet.Cells(25, 2).
End
(xlUp).Row + 1
Cells(last, 2).Value = TextBox_Name
Cells(last, 3).Value = TextBox_Tel
Cells(last, 4).Value = ComboBox1
Cells(last, 5).Value = TextBox_Typ
Cells(last, 6).Value = TextBox_Schluessel
Cells(last, 7).Value = TextBox_HU
Cells(last, 9).Value = TextBox_Notizen
End
If
End
Sub