ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select print area (https://www.excelbanter.com/excel-programming/376985-select-print-area.html)

mcphc

Select print area
 
What code do you use to select the print area of the active sheet?

i.e. something like

PrintArea.Select



NickHK

Select print area
 
The print area is a range defined by the name "Print_Area". So if you record
a macro whilst selecting that from the Names combobox, you get :
Application.Goto Reference:="Print_Area"

or you can use
Range("Print_Area").Select

You should check for that name first or handle the error that will occur if
the print area is not defined.

NickHK

"mcphc" wrote in message
...
What code do you use to select the print area of the active sheet?

i.e. something like

PrintArea.Select





Sune Fibaek

Select print area
 
mcphc wrote:
What code do you use to select the print area of the active sheet?


..PageSetup.PrintArea = "A1:B2"

--
HTH

/Sune

Sune Fibaek

Select print area
 
NickHK wrote:
The print area is a range defined by the name "Print_Area". So if you record
a macro whilst selecting that from the Names combobox, you get :
Application.Goto Reference:="Print_Area"

or you can use
Range("Print_Area").Select


{flashbulb-above-head} Oh, now I get the questions.

mcphc: Please disregard my post.

--


/Sune


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com