Hi All,
I've created this little macro to Autofiler a table in a specified sheet and delete the filtered rows however whenever I run the code an error 1004 appears stating This cannot occur as it would alter cells within my table. I'm unsure as to why it wont allow me to alter rows in a table through code as I don't appear to have any restrictions placed on either the worksheet or the table.
Could it be the code (incorrect delete statement?):
Sheets("UK Feed").Select
ActiveSheet.Range("$A$1:$H$3548").AutoFilter Field:=1, Criteria1:="No"
Rows("2:2").Select
Rows("2:3549").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$H$2").AutoFilter Field:=1
Range("A1").Select
I believe the syntax is correct but i'm unsure - any help would be greatly appreciated!
Kind regards,
B
Bookmarks