I'm new to VBA and need some assistance.
I created a new row with
ActiveCell.Select
Selection.Offset(1).EntireRow.Insert
Now, how do I select the new row for iRow =
?
I'm new to VBA and need some assistance.
I created a new row with
ActiveCell.Select
Selection.Offset(1).EntireRow.Insert
Now, how do I select the new row for iRow =
?
first thing off: always avoid Select
/Selection
and Activate
/ActiveXXX
that being said, and having no clues of how differently refer to the ActiveCell
, code like follows:
ActiveCell.Offset(1).EntireRow.Insert '<--| insert new line just below currently active cell
and then
irow = ActiveCell.Row + 1 '<--! get the row of the ActiveCell and add 1 to it