Private
Sub
CommandButton1_Click()
Dim
wks
As
Worksheet
Dim
addnew
As
Range
Set
wks = Tabelle8
Dim
LetzteZeile
As
Integer
LetzteZeile = 31
Do
While
wks.Cells(LetzteZeile, 1) <>
""
LetzteZeile = LetzteZeile + 1
If
LetzteZeile = 35
Then
MsgBox
"Der reservierte Bereich ist gefüllt, weitere Eingaben nicht möglich."
, _
vbInformation,
"Hinweis"
GoTo
ende
End
If
Loop
Set
addnew = wks.Cells(LetzteZeile, 1)
addnew.Offset(0, 0).Value = txt_1.Text
addnew.Offset(0, 2).Value = combo_1.Value
addnew.Offset(0, 5).Value = txt_2.Text
Set
wks =
Nothing
Exit
Sub
ende:
Unload
Me
Set
wks =
Nothing
End
Sub