Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi June
If you really want to set the print area Sub test() With ActiveSheet ..PageSetup.PrintArea = .UsedRange.Address End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "June" wrote in message ... I guess I didn't state my question correctly. I want Excel to detect the range of cells and set the print area. Does that make sense? Thanks, June -----Original Message----- I have a feeling that Ron's answer is exactly what you are looking for. But if you have a sheet with a lot of data and you wish to set a specific print area such that you WILL NOT print all the data (only the first half, for example)... then you could use something like: ActiveSheet.PageSetup.PrintArea = "$A$1:$G$19" **OR** Workbooks("Name.xls").Sheets ("SheetName").PageSetup.PrintArea = "$A$1:$G$19" --- Message posted from http://www.ExcelForum.com/ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Defining a print area in a macro | Excel Discussion (Misc queries) | |||
Variable print area via a macro | Excel Discussion (Misc queries) | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Create a print macro that would automatically select print area? | Excel Worksheet Functions | |||
Set Print Area Macro | Excel Programming |