Hallo Forum
kann mir jemand helfen, sofern es natürlich möglich ist?
meine VBA-Kenntnisse sind nicht so gut
Ich habe eine UF mit verschiedenen Textboxen, Listboxen und Comboboxen
Jetzt möchte ich alles in meine Tabelle per Knopfdruck (CommandButton1) einfügen.
habe mir ein bisschen was zusammen gebastelt und mache es zurzeit noch so:
Private Sub CommandButton1_Click()
Dim wks As Worksheet
Dim letzte_Zeile As Long
letzte_Zeile = Tabelle2.Cells(Rows.Count, 1).End(xlUp).Row
Set wks = Tabelle2
With wks
If Cells(3, 1).Value = "" Then
Cells(3, 1).Select
Else
.Cells(letzte_Zeile + 1, 1).Select
End If
With ActiveCell
.Offset(, 0) = TextBox1.Value
.Offset(, 1) = TextBox2.Value
.Offset(, 2) = TextBox3.Value
.Offset(, 4) = ComboBox1.Value
.Offset(, 6) = TextBox6.Value
.Offset(, 7) = TextBox7.Value
.Offset(, 8) = "/"
.Offset(, 9) = TextBox6.Value
.Offset(, 14) = ComboBox2.Value
.Offset(, 15) = ComboBox3.Value
.Offset(, 21) = ComboBox7.Value
End With
...
...
...
das ganze funktioniert so weit, aber kann man das ganze auch einwenig kürzer oder anders schreiben?
bin für Änderung offen und dankbar
danke Klaus