H
Harold Good
Hi, I have the following code. As I push F8 to execute manually, after the Insert row, it jumps to another procedure, skips around some of those lines of code, then comes back to execute the last line?
I have noticed this pattern in some other spreadsheet VBA as well.
What am I doing wrong? Thanks, Harold
Private Sub InsertRow()
Dim myRow As Long
myRow = ActiveCell.Row
Do Until Cells(myRow, 2) <> Cells(myRow + 1, 2)
myRow = myRow + 1
Loop
Rows(myRow).Insert
Rows(ActiveCell.Row).Select
End Sub
I have noticed this pattern in some other spreadsheet VBA as well.
What am I doing wrong? Thanks, Harold
Private Sub InsertRow()
Dim myRow As Long
myRow = ActiveCell.Row
Do Until Cells(myRow, 2) <> Cells(myRow + 1, 2)
myRow = myRow + 1
Loop
Rows(myRow).Insert
Rows(ActiveCell.Row).Select
End Sub