Creating Pivot tables by VBA for varying amounts of data
Hi all,
I have to create a number of pivot tables from the same block of data, and
repeat this with new data four weeks later etc. Data is always in the range
("A3:V" & x) where x varies each 4 weeks.
I have successfully in the past substituted "selection" for the R1C1 range
created in a recorded macro for
'ActiveWorkbook.PivotCaches.Add(SourceType:=xlData base,
SourceData:=Selection)'
but this is now coming up with a "type mismatch" error.
If anyone has any ideas I would be very grateful. I am using Office XP.
TIA
Paul
--
Paul at preeve dot plus dot com
|