ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert row code (https://www.excelbanter.com/excel-programming/398408-insert-row-code.html)

glenn[_3_]

Insert row code
 
Hi all

what's the VBA command to insert a row in a worksheet?

Worksheets().Rows().InsertRow ?



thanks

Gary Keramidas

Insert row code
 
worksheets("sheet1").rows(3).entirerow.insert


--


Gary


"glenn" wrote in message ...
Hi all

what's the VBA command to insert a row in a worksheet?

Worksheets().Rows().InsertRow ?



thanks




joel

Insert row code
 
Gary: When using Rows you don't need to use entirerow. It can simply be
worksheets("sheet1").rows(3).insert

entirerow or entire column is only need when you don't have the whole row or
column such as Range("A1:C1") or cells(5,"C")

"Gary Keramidas" wrote:

worksheets("sheet1").rows(3).entirerow.insert


--


Gary


"glenn" wrote in message ...
Hi all

what's the VBA command to insert a row in a worksheet?

Worksheets().Rows().InsertRow ?



thanks





Gary Keramidas

Insert row code
 
thanks, i usually use the entirerow.insert so when i'm reviewing code it's easy
to see it's inserting a row. i've never heard of it causing a problem, it's just
for visual purposes.

--


Gary


"Joel" wrote in message
...
Gary: When using Rows you don't need to use entirerow. It can simply be
worksheets("sheet1").rows(3).insert

entirerow or entire column is only need when you don't have the whole row or
column such as Range("A1:C1") or cells(5,"C")

"Gary Keramidas" wrote:

worksheets("sheet1").rows(3).entirerow.insert


--


Gary


"glenn" wrote in message
...
Hi all

what's the VBA command to insert a row in a worksheet?

Worksheets().Rows().InsertRow ?



thanks








All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com