![]() |
inserting Rows
What are some commands to insert a row with VBA -- Tar ----------------------------------------------------------------------- Taru's Profile: http://www.excelforum.com/member.php...fo&userid=3549 View this thread: http://www.excelforum.com/showthread.php?threadid=55368 |
inserting Rows
Try these: Rows("1:1").Select Selection.Insert Shift:=xlDown or Selection.EntireRow.Insert HTH -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=553684 |
inserting Rows
You anc take any range and expand it to encompass the entire row and then
just insert. here are a few examples... Sub TestInsert() Dim rng As Range Set rng = Range("A2") rng.EntireRow.Insert Range("A4:C6").EntireRow.Insert Range("9:9").Insert End Sub -- HTH... Jim Thomlinson "Taru" wrote: What are some commands to insert a row with VBA? -- Taru ------------------------------------------------------------------------ Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494 View this thread: http://www.excelforum.com/showthread...hreadid=553684 |
inserting Rows
if that wasn't enough try this...
Rows("1:10").Insert Die_Another_Day Jim Thomlinson wrote: You anc take any range and expand it to encompass the entire row and then just insert. here are a few examples... Sub TestInsert() Dim rng As Range Set rng = Range("A2") rng.EntireRow.Insert Range("A4:C6").EntireRow.Insert Range("9:9").Insert End Sub -- HTH... Jim Thomlinson "Taru" wrote: What are some commands to insert a row with VBA? -- Taru ------------------------------------------------------------------------ Taru's Profile: http://www.excelforum.com/member.php...o&userid=35494 View this thread: http://www.excelforum.com/showthread...hreadid=553684 |
All times are GMT +1. The time now is 06:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com