(Solved) – Macro stop running after insertion of a row is executed

  • by
(solved)-–-macro-stop-running-after-insertion-of-a-row-is-executed

I was trying to make a macro which first insert a row, and then select it. But it seems like the will stop running after the insertion of row, and won’t continue to execute any line below it.

Code:

    Sub Macro5()

        Row1 = ActiveCell.Row
        Row2 = CurrentRow1   1
        Rows(Row2).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Rows(Row1).Select

    End Sub

Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *