Hoping somebody can help me with this. I'm trying to implement code into excel that will setup the print area of the worksheet based on the size of the pivot table (since it is the only object on the sheet. The pivot table's size will grow month to month, so cell reference is irrelevant.
Below is the code I came up with:
Of course, this gives me the errorDim Rng As Range
Set Rng = ActiveSheet.PivotTables("EEVPivot").TableRange2
Rng.Select
ActiveSheet.PageSetup.PrintArea = RngWhat am I doing wrong?? Is there anybody out there who can help???"Unable to set the PrintArea property of the PageSetup class"
Bookmarks