Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Yet another macro question

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Yet another macro question

This should be close...

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

Jim Thomlinson


"cvgairport" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Yet another macro question

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.


"cvgairport" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Yet another macro question

As usual, you guys rock!

"Jim Thomlinson" wrote:

This should be close...

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

Jim Thomlinson


"cvgairport" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Macro question Gilbert Excel Discussion (Misc queries) 7 November 8th 07 06:15 PM
Macro question John Excel Worksheet Functions 7 October 19th 06 04:48 PM
question on macro Harry Excel Discussion (Misc queries) 8 April 13th 06 04:25 PM
Macro Question ALoecher New Users to Excel 3 March 9th 06 10:12 PM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"