Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try using the actual location:
TableDestination:="[YourWorkbookName]Report!R3C1" As opposed to: TableDestination:="" I hope this helps. -----Original Message----- How would I have to change this code so that the pivot table is created on the sheet named "Report" within the active workbook? ActiveWorkbook.PivotCaches.Add (SourceType:=xlDatabase, SourceData:="data"). _ CreatePivotTable TableDestination:="", TableName:="PivotTable1" ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select ActiveSheet.PivotTables("PivotTable1").SmallGrid = False ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:=Array("PDWK", "WK - HM Store", _ "FileNo", "Employee", "Stat/Class", "LTRCode"), ColumnFields:="Type" TIA, AlanN |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error "invalid data source reference" for pivot table | Excel Worksheet Functions | |||
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters | Excel Discussion (Misc queries) | |||
Pivot Table "Data source reference is not valid" error cause? | Excel Discussion (Misc queries) | |||
"A pivot table report cannot overlap another pivot table report" | Excel Worksheet Functions | |||
Can I "customize" an autoformat report for a Pivot Table in Excel | Excel Discussion (Misc queries) |