How to use VBA code to insert a row at the top of a table

< Back to Search results

 Category: [Excel]  Demo Available 

How to use VBA code to insert a row at the top of a table




The user is trying to add a button that will allow me to add a new table row at the top of the table. It is important that it only adds a table row and not an entire row.




In order to insert a row at the top of your table ... you can test following

ActiveSheet.ListObjects("Table1").ListRows.Add (1)


Obtained from the OzGrid Help Forum.

Solution provided by Carim.


See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets


See also:

How to use code to remove columns
How to VBA code to count duplicates FAST
How to create VBA code to find next empty column and next empty row
How to skip VBA Code if table filter returns nothing


Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


stars (0 Reviews)