Private
Sub
CommandButton5_Click()
Dim
rng
As
Range
Dim
lngZeile
As
Long
Dim
arr
As
Variant
Set
rng = Sheets(
"Kunden"
).Range(
"a:a"
).Find(what:=TextBox17.Value, lookat:=xlWhole, LookIn:=xlValues)
If
Not
rng
Is
Nothing
Then
lngZeile = rng.Row
arr = Split(TextBox1, vbLf)
Sheets(
"Kunden"
).Range(Sheets(
"Kunden"
).Cells(lngZeile, 3), Sheets(
"Kunden"
).Cells(lngZeile, 3 + UBound(arr, 1))) = arr
If
Not
rng
Is
Nothing
Then
lngZeile = rng.Row
Sheets(
"Kunden"
).Cells(lngZeile, 13) = TextBox16
Sheets(
"Kunden"
).Cells(lngZeile, 10) = TextBox15
Sheets(
"Kunden"
).Cells(lngZeile, 1) = TextBox17.Value
Sheets(
"Kunden"
).Cells(lngZeile, 17) = TextBox18
If
IsNumeric(TextBox19)
Then
Sheets(
"Kunden"
).Cells(lngZeile, 18).Value = TextBox19 * 1
Else
Sheets(
"Kunden"
).Cells(lngZeile, 18).Value = TextBox19.Value * 1
End
If
Sheets(
"Kunden"
).Cells(lngZeile, 9) = TextBox11
Sheets(
"Kunden"
).Cells(lngZeile, 8) = TextBox13
Sheets(
"Kunden"
).Cells(lngZeile, 15) = ComboBox1
Sheets(
"Kunden"
).Cells(lngZeile, 16) = ComboBox2
Sheets(
"Kunden"
).Cells(lngZeile, 26) = TextBox26
End
If
End
Sub