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
|