Thread: pivot table
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tjh tjh is offline
external usenet poster
 
Posts: 96
Default pivot table

I recorded the macro below, but altered it to try and accept the name
range "bas1" and the new tab/worksheet named "strNewPg". bas1 should be the
source data, and strNewpg should be the page where the pivot table is
created. I would like it to be created in cell a3 of the strNewPg worksheet.

Thank you for your help.

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:=bas1).CreatePivotTable TableDestination:= _
worksheet(strNewPg).range("a3"), TableName:="PivotTable39", _
DefaultVersion:=xlPivotTableVersion10