Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The grouped sheet behavior you're trying to use only works from the
keyboard. You can try to simulate that with SendKeys: Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select Rows(9).Resize(3, 1).EntireRow.Select SendKeys "^{+}" "halibut" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert rows in many sheets | Excel Programming | |||
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. | Excel Programming | |||
insert rows in multi sheets | Excel Programming | |||
Links between sheets in error due to insert rows | Excel Discussion (Misc queries) | |||
Insert rows on multiple sheets | Excel Programming |