How to insert 10 rows at the end of the table insert 1 rows at the end of the table I have VBA
S S P P Member Sep 21, 2022 #1 How to insert 10 rows at the end of the table insert 1 rows at the end of the table I have VBA Attachments SPP How to insert 10 rows at the end of the table.xlsm 22.5 KB · Views: 2
Marc L Excel Ninja Sep 21, 2022 #2 As when using an Excel table the row insertion is automatic so no need obviously any VBA procedure …
As when using an Excel table the row insertion is automatic so no need obviously any VBA procedure …
S S P P Member Sep 21, 2022 #3 Marc L I thought there would be a way to insert the newline as Vba at the end. There is a way to repeat this newline VBA like clicking multiple times
Marc L I thought there would be a way to insert the newline as Vba at the end. There is a way to repeat this newline VBA like clicking multiple times
S S P P Member Sep 21, 2022 #4 I got it like this >>> use code - tags <<< Code: Sub Insert10LineattheEnd() For Counter = 1 To 10 Run "Insert1LineattheEnd" Next Counter End Sub Sub Insert1LineattheEnd() ActiveSheet.ListObjects(1).ListRows.Add End Sub Last edited by a moderator: Sep 22, 2022
I got it like this >>> use code - tags <<< Code: Sub Insert10LineattheEnd() For Counter = 1 To 10 Run "Insert1LineattheEnd" Next Counter End Sub Sub Insert1LineattheEnd() ActiveSheet.ListObjects(1).ListRows.Add End Sub
Keetoowah Member Sep 23, 2022 #5 or, more simply, to save ink in case someone wants to insert your code in a book Code: Sub Insert10LineattheEnd() For Counter = 1 To 10 ActiveSheet.ListObjects(1).ListRows.Add Next Counter End Sub
or, more simply, to save ink in case someone wants to insert your code in a book Code: Sub Insert10LineattheEnd() For Counter = 1 To 10 ActiveSheet.ListObjects(1).ListRows.Add Next Counter End Sub
S S P P Member Sep 23, 2022 #6 Keetoowah It also works but simpler. I always try to simplify the VBA I use. thanks for simplifying >>> use code - tags <<< Code: Private Sub CommandButton1_Click() For Counter = 1 To 10 ActiveSheet.ListObjects(1).ListRows.Add Next Counter End Sub
Keetoowah It also works but simpler. I always try to simplify the VBA I use. thanks for simplifying >>> use code - tags <<< Code: Private Sub CommandButton1_Click() For Counter = 1 To 10 ActiveSheet.ListObjects(1).ListRows.Add Next Counter End Sub