Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Area
I want to set the print area with my macro. If I know the
ending row, I can use the following formula: ActiveSheet.PageSetup.PrintArea = "$A$1:$L$101" However. the last row will be different every time. It will always be column L. Is there a better way to do this? Any help or suggestions would be apprecatiated. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Area
One way:
With ActiveSheet .PageSetup.PrintArea = .Range(.Cells(1, 1), _ .Cells(.Rows.Count, 12).End(xlUp)).Address End With In article , "JT" wrote: I want to set the print area with my macro. If I know the ending row, I can use the following formula: ActiveSheet.PageSetup.PrintArea = "$A$1:$L$101" However. the last row will be different every time. It will always be column L. Is there a better way to do this? Any help or suggestions would be apprecatiated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
File, print area, clear area, is not working | New Users to Excel | |||
print area across the freeze panes area | Excel Worksheet Functions | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |