Everything I've read says that this code should work:
I get the Delete Method of Range Class Fails message on the indicated line.![]()
Sub RemoveDups() Dim shD As Worksheet Application.ScreenUpdating = False Set shD = Sheets("Data") shD.ListObjects("Table_Data").Range.AutoFilter Field:=10, Criteria1:="TRUE" If Application.WorksheetFunction.CountIf(Range("Table_Data[Duplicate]"), True) > 0 Then shD.Range("Table_Data").SpecialCells(xlCellTypeVisible).EntireRow.Delete End If shD.ListObjects("Table_Data").Range.AutoFilter Field:=10, Criteria1:="FALSE" Application.ScreenUpdating = True End Sub
Bookmarks