Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional page set-up
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional page set-up
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional page set-up
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. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Page Break | Excel Worksheet Functions | |||
Conditional Formatting - Before Page Break | Excel Discussion (Misc queries) | |||
Conditional page break if merged rows won't fit on the page. | Excel Worksheet Functions | |||
Conditional page breaks? | Excel Discussion (Misc queries) | |||
Are conditional formats available for setting page breaks? | Excel Discussion (Misc queries) |