View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default programmatically insert multiple blank rows in worksheet

Try changing the following line of code:

ActiveCell.EntireRow.Insert shift:=x1Down

to

ActiveCell.Resize(7).EntireRow.Insert shift:=x1Down

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"tag" wrote in message
...
This is the code to insert a blank row after each row of
data in my worksheet. I need to convert it to inserting 7
blank rows afer each row of data. So far...no luck.
Can anyone assist?
Thanks in advance!!

Sub Insert_Blank_Rows()

'Select last row in worksheet.
Selection.End(x1Down).Select

Do Until ActiveCell.Row = 1
'Insert blank row.
ActiveCell.EntireRow.Insert shift:=x1Down
'Move up one row.
ActiveCell.Offset(-1, 0).Select
Loop

End Sub