View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Vick Vick is offline
external usenet poster
 
Posts: 63
Default Print Area Macro Question

I'm using a macro worksheet change macro, so that when ever someone changes a
pivottable the sheet will automatically change the print area of the pivot
table. I'm trying the following code, but everytime I try and record I get a
fixed value as you see here. How can I get the print area to use the range I
selected above?

Range("E10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.PageSetup.PrintArea = "$E$10:$P$32"

Thanks