Just recently I've been trying to delete all data rows in a table, apart from the first (which needs to just be cleared)
Some of the tables being actioned could already have no rows, so I was running it to problems as using .DataBodyRange.Rows.Count
on a table with no rows (just header and/or footer) causes errors.
I looked all over for a solution an could not find a whole one, so I hope my answer to this question will be useful to others in the future.
This is how I clear the data:
Sub Macro3()
With Sheet1.ListObjects("Table1")
If Not .DataBodyRange Is Nothing Then
.DataBodyRange.Delete
End If
End With
End Sub