View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default Dynamically changing print areas for Pivot Tables

You could use code similar to the following:

'====================
Sub SetPrintArea()
With ActiveSheet
.PageSetup.PrintArea = _
.PivotTables(1).TableRange2.Address
End With

End Sub
'================

Todd1 wrote:
I have several pivot tables that expand and contract with data. I am
constantly changing print areas to accomodate all the data or to make sure
the data prints in a nice format on a single sheet.

Does anyone know how a macro could be set up that could print any data that
is continuously present in rows or columns? I'm an advanced excel user, but
not a programmer. I can record macros, and write very, very basic macro code.

Any help would be greatly appreciated.

Todd.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html