ich habe der Code:
Private Sub Daten_löschen_Click()
'Auf
If TextBox2 = "" Then
MsgBox "Name Fehlt....."
TextBox2.SetFocus
Exit Sub
End If
ActiveCell.Select
Dim irisposta As Integer
irisposta = MsgBox("lösche Daten von: " & ActiveCell.Value & " ?", vbYesNo)
If irisposta = vbYes Then
ActiveCell.EntireRow.Delete
Dim CA As Object
Range("A3:A10000").ClearContents
Range("A3").Value = 1
For Each CA In Range("A3:A10000")'*****
If CA.Offset(1, 0) = "" Then
CA.Offset(1, 0) = CA + 1
End If
Next
End If
'Zu
Dim f As Integer
For f = 1 To 20
Controls("TextBox" & f) = ""
Next
MsgBox " Gelöscht!!! "
End Sub
Ich möchte die Spalte neu numerieren NUR BIS LETZTE ZELLE DIE DATEN ENTHÄLT.
und nicht bis A10000
Weiss jemand Rat?
Danke
Bongiu