ich bin Anfänger in VBA, bin aber schwer am lernen.
Nun komme ich aber nicht weiter.
Im beliegenden VBA ist ein Fehler.
Wenn Zelle A65 leer ist, und B65 gefüllt, dann überschreibt mir das Formular die falsche Zeile.
Excel müsste doch mit diesem Makro in Zeile 66 springen und dort den Wert füllen - oder nicht.
Danke
Hans
Private Sub cmdUebernehmen_Click()
Dim iCol As Integer, iRowL As Integer
If IsEmpty(Cells(1, 1)) Then
iRowL = 1
Else
iRowL = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
Cells(iRowL, 1) = txtName.Text
Cells(iRowL, 2) = txtVorname.Text
Cells(iRowL, 3) = txtStrasse.Text
Cells(iRowL, 4) = txtPLZOrt.Text
Cells(iRowL, 5) = txtMail.Text
Unload Me
frmSuchen.Show
End Sub