Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do you insert rows in a sheet that has a PivotTable
I am trying to programatically add rows to a worksheet that has a PivotTable,
but I always get an error. Here is the code: Dim sheet As Excel.Worksheet Dim cell, newCell As Excel.Range Set sheet = Application.ActiveSheet Set cell = sheet.Cells(1, 1) cell.Select cell.Insert (Excel.XlInsertShiftDirection.xlShiftDown) This code works if the worksheet does not contain a PivotTable. The PivotTable is located at cell A3 so it shouldn't be in the way of the inserted row. Thanks in advance for any insight on how to make this work. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 excel work sheet will not allow to insert rows or columns | Excel Discussion (Misc queries) | |||
copy rows based on conditions and insert them into another sheet... | Excel Programming | |||
copy cells in two columns if in bold to another sheet and insert rows | Excel Programming | |||
Insert Rows in Balance Sheet Template | New Users to Excel | |||
In Excell sheet i want to insert more than 65,536 rows how i can . | Excel Worksheet Functions |