Gebe über Userform1 Daten ins Tabellenblatt ein . Meine Frage ist kann man den Code kürzer schreiben.
Public Sub DatenEingabe()
With ActiveSheet
For lngSpalte = 2 To 65536
If .Cells(lngSpalte, 20) = Empty Then
.Cells(lngSpalte, 20) = UserForm1.ComboBox2.Text
.Cells(lngSpalte, 21) = UserForm1.TextBox2.Text
.Cells(lngSpalte, 22) = UserForm1.TextBox3.Text
.Cells(lngSpalte, 23) = UserForm1.TextBox4.Text
.Cells(lngSpalte, 24) = UserForm1.TextBox5.Text
.Cells(lngSpalte, 25) = UserForm1.TextBox6.Text
.Cells(lngSpalte, 26) = UserForm1.TextBox7.Text
.Cells(lngSpalte, 27) = UserForm1.TextBox8.Text
.Cells(lngSpalte, 28) = UserForm1.TextBox9.Text
.Cells(lngSpalte, 29) = UserForm1.TextBox10.Text
.Cells(lngSpalte, 30) = UserForm1.TextBox11.Text
.Cells(lngSpalte, 31) = UserForm1.TextBox12.Text
.Cells(lngSpalte, 32) = UserForm1.TextBox13.Text
.Cells(lngSpalte, 33) = UserForm1.TextBox14.Text
.Cells(lngSpalte, 34) = UserForm1.TextBox15.Text
.Cells(lngSpalte, 35) = UserForm1.TextBox16.Text
.Cells(lngSpalte, 36) = UserForm1.TextBox17.Text
Exit For
End If
Next
End With
End Sub
mfg Ralf