View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default PivotTableDestination

You can specify the sheet and range in the TableDestination argument:

TableDestination:=Sheets("Pivot").Cells(3, 1)

moglione1 wrote:
Can anybody please tell me how you add a pivot table to an existing
sheet using VBA. I currently have the code:

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, _
SourceData:="=Data").CreatePivotTable TableDestination:="", _
TableName:="Part2"

PLEASE PLEASE HELP




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html