Yet another macro question

C

cvgairport

This is what I get for trying this on my own. I just want a macro that will
insert 2 blank rows at the current cursor position.

Sub Insert2Rows()
'
' qrow = ActiveCell.Row
Rows(qrow & ":" & grow + 1).Selection.Insert Shift:=xlDown
End Sub

Any ideas?

Thanks!

Amy
 
J

Jim Thomlinson

This should be close...

Sub Insert2Rows()
ActiveCell.Resize(2, 1).EntireRow.Insert
End Sub
 
M

Mike H

Hi,

Maybe this

Sub Insert2Rows()
'
qrow = ActiveCell.Row

Rows(qrow).Resize(2).Insert

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

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