Inserting rows

  • Thread starter Francis Hookham
  • Start date
F

Francis Hookham

Varable iR is the row where I need to insert a row.
Given iCount is the numbers of rows to be inserted, how can this be altered
to insert that number of rows?

Sheets("Pages").Rows(iR + 1).EntireRow.Insert

The following does it but is so cumbersome, having to select first:

Cells(iR+ 2, 1).Select
ActiveCell.Rows("1:" & iCount).EntireRow.Select
Selection.Insert Shift:=xlDown

Many thanks
Francis Hookham
 
M

Michael

Doing this wil speed up the insertion because is not selecting:

Cells(ir + 2, 1).Rows("1:" & icount).EntireRow.Insert Shift:=xlDown
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top