• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Expand existing table

Mr.Karr

Member
Hello

Is there a way to expand the existing table by adding additional rows ? Imagine I already have a table ranging A1 to AB1000. Will be inserting and adding more ranges to it. But for some reasons existing table is not automatically picking up the newly added ranges/rows.

I tried below snippet to .unlist, select range and table again. But the slicers are getting deleted everytime I do this. There are nearly 12 to 17 slicers are there.

Code:
Dim oTbl As ListObject

ActiveSheet.ListObjects(1).Unlist

  ActiveSheet.ListObjects.Add(xlSrcRange, Range([A20].End(xlDown), [A20].End(xlToRight)), , xlYes).Name = "Table1"

ActiveSheet.ListObjects(1).TableStyle = ""

Is there a way to automatically have the table to pick up ranges ? or any other alternate methods? Please advise.

Many thanks in advance.
 
Back
Top