![]() |
Adding Row to this macro
Hi,
I have this macro which runs in a routine on a hidden sheet when a button is pressed. iRow = ws.Cells(Rows.Count, 1) _ .End(xlUp).Offset(1, 0).Row Can anyone help me to carry out the following? When it has found the next available cell on the hidden sheet, i would like it to add a row. Help mist graciously appreciated. nigel |
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row ws.rows(iRow).Insert -- HTH RP (remove nothere from the email address if mailing direct) "Nigel" wrote in message ... Hi, I have this macro which runs in a routine on a hidden sheet when a button is pressed. iRow = ws.Cells(Rows.Count, 1) _ .End(xlUp).Offset(1, 0).Row Can anyone help me to carry out the following? When it has found the next available cell on the hidden sheet, i would like it to add a row. Help mist graciously appreciated. nigel |
try one of these
Sub addrow() Set ws = Sheets(4) ws.Rows(ws.Cells(Rows.Count, 1).End(xlUp).Row).Insert End Sub Sub addrow1() With Sheets(4) ..Rows(.Cells(.Rows.Count, 1).End(xlUp).Row).Insert End With End Sub -- Don Guillett SalesAid Software "Nigel" wrote in message ... Hi, I have this macro which runs in a routine on a hidden sheet when a button is pressed. iRow = ws.Cells(Rows.Count, 1) _ .End(xlUp).Offset(1, 0).Row Can anyone help me to carry out the following? When it has found the next available cell on the hidden sheet, i would like it to add a row. Help mist graciously appreciated. nigel |
All times are GMT +1. The time now is 08:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com