PivotTableDestination

  • Thread starter Thread starter moglione1
  • Start date Start date
M

moglione1

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:=xlDatabase, _
SourceData:="=Data").CreatePivotTable TableDestination:="", _
TableName:="Part2"

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top