View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Fred Smith Fred Smith is offline
external usenet poster
 
Posts: 623
Default Creating multiple pivot tables from same cache

That was it!

For some reason, Excel will, when given a blank destination, create a first
pt, and a second pt, but won't create the third.

Oh well, live and learn.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"xlbo" wrote in message
...
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 use

sheets.add after:=sheets(sheets.count)

Set PT =

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

or similar