ich habe eine Formel
jetzt möchte ich wenn ich eine neue Zeile einfüge über
Private Sub CommandButton1_Click()
Windows("stehende Anlagen").Activate
Dim lngErsteFreie As Long
Dim intSpalte As Integer
Dim i As Integer
If CommandButton1.Caption = "Neuer Eintrag" Then
For i = 1 To 5
Controls("Textbox" & i) = ""
Next
For i = 1 To 2
Controls("Checkbox" & i) = False
TextBox2.SetFocus
Next
CommandButton1.Caption = "Neuer Eintrag Speichern"
CommandButton1.Enabled = False
CheckBox5.Value = True
Else
lngErsteFreie = Cells(Rows.Count, "A").End(xlUp).Row + 1
For intSpalte = 1 To 5
Cells(lngErsteFreie, intSpalte).Value = Controls("TextBox" & intSpalte)
Next
Cells(lngErsteFreie, 6).Value = CheckBox1
Cells(lngErsteFreie, 7).Value = CheckBox2
Call Zuruecksetzen
Call UserForm_Initialize
End If
End Sub
das er mir immer in spalte 8 die formel einträgt und dann den g und d verweis auf die richitge zeilen nr setzt.
wie kann ich das lösen
ich schaff es einfach nicht