I am trying to delete an entire row from a Table (ListObject), but I have issues adressing the Row. Following code works prefect when the table is not filtered:
Sub loeschen()
If errorhandling Then On Error GoTo fehlerbehandlung
ActiveCell.ListObject.ListRows(ActiveCell.Row - ActiveCell.ListObject.HeaderRowRange.Row).Delete
Exit Sub
fehlerbehandlung:
fehlermeldung
End Sub
Filtering is done by user in Excel, not VBA. Is there a direct way to delete a row or do I have to unfilter it? And if that's the case, how do I filter it again the same way (the user shouldn't notice anything, I'll apply Application.ScreenUpdatingif necessary.