Inserting Rows Without Selecting Anyting?

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-04-26T15:51:13Z Indexed on 2010/04/26 15:53 UTC
Read the original article Hit count: 264

Filed under:
|

Hello SO,

I'm working in VBA and want to insert a row in a specific location without selecting it. The issue I'm having is that after the row is selected, the spreadsheet is scrolled down to that row when the script is finished running. I want to be able to do this without the spreadsheet being scrolled down to the inserted row.

Rows(i & ":" & i).Select
ActiveCell.EntireRow.Insert

I don't want to select A1 to get to the top.

© Stack Overflow or respective owner

Related posts about vba

Related posts about insert