H
HartJF
I need to insert a row on multiple adjacent sheets. I need to do it as a
group because I have a 3-D summary sheet whose reference must remain aligned.
The active cell on each sheet may be different. I want to insert the row at
the location of the active cell on the active sheet. Here's what I've done:
Worksheets(avarSheet).Select
Selection.Rows(intRow).Select
With Selection
.EntireRow.Insert
*** formatting instructions ***
End With
avarSheet is a variant containing an array, which is properly populated with
the names of the sheets to which the row should be added. The worksheets are
successfully selected as a group. intRow contains the number of the row of
the active cell on the active worksheet.
When I run this code, a row is inserted only on Sheet avarSheet(0), and at
the current row of Sheet avarSheet(0) plus intRow.
What am I doing wrong?
group because I have a 3-D summary sheet whose reference must remain aligned.
The active cell on each sheet may be different. I want to insert the row at
the location of the active cell on the active sheet. Here's what I've done:
Worksheets(avarSheet).Select
Selection.Rows(intRow).Select
With Selection
.EntireRow.Insert
*** formatting instructions ***
End With
avarSheet is a variant containing an array, which is properly populated with
the names of the sheets to which the row should be added. The worksheets are
successfully selected as a group. intRow contains the number of the row of
the active cell on the active worksheet.
When I run this code, a row is inserted only on Sheet avarSheet(0), and at
the current row of Sheet avarSheet(0) plus intRow.
What am I doing wrong?