View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel print area size

Just some added,
you could hide rows and columns you don't want printed and then print
without specifying a printarea.

--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Tom, i removed my line that stated the print area, However i have some

other
business that is happening on the sheet also, i am using cells to hold
formula results and then are showing them in the printed sheet.

when i set the print area these cells did not show or print, now they do.

i am a little confused as to my options with this. that is why i set the
print area before, to stop these from printing,

"Tom Ogilvy" wrote:

Don't set a print area. By default, excel prints all the data.

This can be a problem if Excel thinks you usedrange is larger than it
actually is - but if your are creating the sheet, this shouldn't be a
problem.

Otherwise

Activesheet.PageSetup.PrintArea =
ActiveSheet.UsedRange.Address(external:=True)

or if it is like a database

Activesheet.PageSetup.PrintArea = _
ActiveSheet.Range("A1").CurrentRegion.Address(exte rnal:=True)

--
Regards,
Tom Ogilvy


"Tom" wrote in message
...
Hello, i am creating an excell sheet by code with Visual Fox Pro.

everything
is fine with one exception. i have set the print area to be a certain

size,
but my data wcould be larger than that, so when it prints i get the

last
page
cut off.

is there a way to have the sheet or workbook print area shrink or grow
depending on the data?