Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet that is shown in page break preview view.
The heavy blue outline shows the boundary of what is shown in a print preview. There is no print area set. I would like a macro that would find the address of this blue boundary and set it to the print area. How can this be done? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A1").SpecialCells(xlLastCell).address will give you the bottom right
cell used. -- JNW "mcphc" wrote: I have a worksheet that is shown in page break preview view. The heavy blue outline shows the boundary of what is shown in a print preview. There is no print area set. I would like a macro that would find the address of this blue boundary and set it to the print area. How can this be done? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Found it!
ActiveSheet.PageSetup.PrintArea = ActiveSheet.UsedRange.Address So simple! "mcphc" wrote: I have a worksheet that is shown in page break preview view. The heavy blue outline shows the boundary of what is shown in a print preview. There is no print area set. I would like a macro that would find the address of this blue boundary and set it to the print area. How can this be done? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks that is easy!
-- JNW "mcphc" wrote: Found it! ActiveSheet.PageSetup.PrintArea = ActiveSheet.UsedRange.Address So simple! "mcphc" wrote: I have a worksheet that is shown in page break preview view. The heavy blue outline shows the boundary of what is shown in a print preview. There is no print area set. I would like a macro that would find the address of this blue boundary and set it to the print area. How can this be done? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 | |||
Macro - Set Print Area for Changing Data Area | Excel Programming | |||
Find print area | Excel Discussion (Misc queries) | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |