Hello,
I obtained the following through the macro recorder, and just tweaked the source data to make sure all rows up to 65536 are captured:
<font face=Courier New>ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _<br> "'" & ActiveSheet.Name & "'!A1:Q403").CreatePivotTable TableDestination:="", _<br> TableName:="PivotTable1"</FONT>
...
Previously in my code I calculated the row # of the last row in the source data sheet and called it "Lastrow". Can I use this variable in the code obtained through the macro recorder? Not sure about what the syntax should then be...
Thanks for your help,
Plix
I obtained the following through the macro recorder, and just tweaked the source data to make sure all rows up to 65536 are captured:
<font face=Courier New>ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _<br> "'" & ActiveSheet.Name & "'!A1:Q403").CreatePivotTable TableDestination:="", _<br> TableName:="PivotTable1"</FONT>
...
Previously in my code I calculated the row # of the last row in the source data sheet and called it "Lastrow". Can I use this variable in the code obtained through the macro recorder? Not sure about what the syntax should then be...
Thanks for your help,
Plix