View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Excel MVP Don Guillett Excel MVP is offline
external usenet poster
 
Posts: 168
Default Insert rows in grouped sheets

On Oct 13, 1:30*am, halibut wrote:
I'm trying insert rows in grouped sheets. I am using the following
code:

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Rows(9).Resize(3, 1).EntireRow.Insert Shift:=xlDown

The sheets are grouped, however the additional rows are only inserted
in sheet1. How do I get the additional rows inserted in the all the
sheets in the array?

Thanks

Paul


Sub insertrows()
For Each ws In Array("Sheet1", "Sheet2", "Sheet3")
Sheets(ws).Rows(9).Resize(3).Insert
Next ws
End Sub