View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Adding in row at bottom of range

What I got out of that is you want to expand the printarea by 1 row?

Dim rng as Range

set rng = Range("AATableA")
set rng = rng.resize(rng.rows.count+)
ActiveSheet.PageSetup.PrintArea = rng.Address(external:=True)
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$5"
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.LeftFooter = "&F"
End With
ActiveWindow.SelectedSheets.PrintOut

--
Regards,
Tom Ogilvy


"Graham Haughs" wrote in message
...
I have a named dynamic range for printing, ie AATableA which is defined
as =OFFSET('Table A Master'!$A$1,0,0,'TableA Input'!$B$160,18)
The part of the procedure below prints out only those rows which have
continuous entries and leave all the blank rows below. This works fine
but on row 160 there are totals for the columns already in the printout.
What I want to do ideally is to print out the completed rows as I do
already but somehow in the procedure add in the totals row at the bottom
of the printed rows. Is there some way to add this to the print area or
does it have to be re-written in another procedure.


ActiveSheet.PageSetup.PrintArea = "AATableA"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$5"
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.LeftFooter = "&F"
End With
ActiveWindow.SelectedSheets.PrintOut

Grateful as always for any guidance.

Graham Haughs
Turriff
Scotland