1
I’m having a hard time deleting lines from a table, not just the content, but that doesn’t affect the worksheet lines. I recorded a macro that resulted in the following code:
Range("Tabela193").Select
Selection.ListObject.ListRows(1).Delete
Selection.ListObject.ListRows(1).Delete
Selection.ListObject.ListRows(1).Delete
This worked but as the number of lines is variable, I have to put a routine that counts the number of lines and repeat the line "Selection.ListObject.Listrows(1). Delete" to the last line. Another detail is that if you have a single line and it has no data, ignore the "Selection.ListObject.Listrows(1) routine. Delete" and select another table to copy the data from it.
Behold this answer
– danieltakeshi