View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
xlbo[_2_] xlbo[_2_] is offline
external usenet poster
 
Posts: 7
Default Creating multiple pivot tables from same cache

untested but it is probably the "destination" argument. If you leave it blank it will try to create a new sheet - once but if you do it multiple times it may be trying to overwrite the 2nd pivottable. Instead of leaving it blank, you could us

sheets.add after:=sheets(sheets.count

Set PT = PTCache.CreatePivotTable(TableDestination:=sheets( sheets.count).range("A1"),
TableName:="AssetLevels"

or similar