Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report"

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error "invalid data source reference" for pivot table Manny Excel Worksheet Functions 6 April 5th 23 02:58 PM
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters tommcbrny Excel Discussion (Misc queries) 1 October 29th 09 03:08 AM
Pivot Table "Data source reference is not valid" error cause? Bill Neurohr Excel Discussion (Misc queries) 1 March 11th 09 10:16 PM
"A pivot table report cannot overlap another pivot table report" ExcelPowerUserWannaBe Excel Worksheet Functions 0 July 22nd 08 05:36 PM
Can I "customize" an autoformat report for a Pivot Table in Excel Nancy Excel Discussion (Misc queries) 1 April 6th 06 01:58 AM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"