I receive an error when running a recorded macro that I don't know how to fix. The macro copies data into a named worksheet then I use CTL 'T' to format the copied data as a table (allowing user to sort/filter as needed). When I run the macro I receive the error;
Run-time error '1004':
A table cannot overlap another table.
I believe it is seeing the table format as being already there from using the CTL 'T' during recording. It identified the table as "Table3" during setup but subsequent runs assign a sequential number so it does recognize the "Table3" name.
Anyone know a fix around this?
Run-time error '1004':
A table cannot overlap another table.
I believe it is seeing the table format as being already there from using the CTL 'T' during recording. It identified the table as "Table3" during setup but subsequent runs assign a sequential number so it does recognize the "Table3" name.
Anyone know a fix around this?
Code:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$7:$AH$107"), , xlYes).Name = _
"Table3"
Range("Table3[#All]").Select
[code]
Once I have this figured out I am going to ask if there is a way to have the macro run a loop that checks to see if there is a blank in the cell of the first column and if so delete that row and continue checking for 100 rows. I would want to do this immediately prior to formatting the data as a table (the copied data may or may not have data in each row).