I was wondering if any body can help me the below code:
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Data!R" & rowDataHead & "C1:R" & rLast & "c" & cLast).CreatePivotTable TableDestination:=Sheets(TabPivotData).Range("A1"), _
TableName:="PivotData", DefaultVersion:=xlPivotTableVersion10
When I changed my data sheet from 37 Columns to 21 Columns and run the same pivot data, it highlighted the above code…I tried to put back my original data (37 columns’) and it works fine..
Thanks in advance.
Jimmy
Bookmarks