Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cracked it. Thanks !
"mepetey" wrote in message ... Thanks for the fast response, how do I limit the print from column A to column I? "Per Jessen" wrote in message ... On 25 Nov., 11:46, "mepetey" wrote: Need a little help please guys, I have a worksheet that, after running filters, presents me with the data I actually need. Trouble is the list varies in length on each run. It's a pain to keep manually changing the print area. Can anyone help with a routine to set the print area down to the last "occupied" row? Any help greatly appreciated. Put the code in the codesheet for ThisWorkbook. Private Sub Workbook_BeforePrint(Cancel As Boolean) FirstCell = "A1" LastCell = Range("A1").End(xlDown).End(xlToRight).Address ActiveSheet.PageSetup.PrintArea = Range(FirstCell, LastCell).Address End Sub Regards, Per |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Room Occupied Checker Formula Help | Excel Worksheet Functions | |||
newbie - how to paste into an occupied cell | New Users to Excel | |||
Find next occupied row up in another column | Excel Worksheet Functions | |||
Selecting occupied cell over empty ones | Excel Discussion (Misc queries) | |||
Selecting occupied cell over empty ones | Excel Discussion (Misc queries) |