conditional page set-up
Hi Dan
thanks - glad to assist
Cheers
JulieD
"Dan Wasser" wrote in message
...
You're wonderful, Julie. It worked perfectly. Thanks!
Dan
-----Original Message-----
Hi Dan
not sure if there's a better way, but this is how i got
it to work on some
code i was playing with this morning - i was using
landscape orientation ...
and 20 rows seemed to work well for my data.
lrow = ActiveCell.SpecialCells(xlLastCell).Row
i = Val(lrow) / 20
With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = i
End With
(there is of course other code around these lines)
cheers
JulieD
"Dan Wasser" wrote in message
...
My macro defines the page set-up to be "Fit to 1 page
wide
by 2 pages tall." But, sometimes, I need it to be "1
page
wide and THREE pages tall." It depends on how many
lines
of data there are after my macro runs. How do I
determine
the number of lines of data? In other words, how do I
tell the macro to determine how many lines of data there
are? Thanks.
.
|