Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a macro that will automatically find the row with
the last entry and set the print range to that row and then print. Assuming columns A through D will contain data, what would the VBA code look like? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you remove the Print_Area definition in the Names, then printing the
sheet should do what you want. otherwise Dim rng as Range set rng = Cells(rows.count,1).end(xlup) Activesheet.PageSetup.Printarea = _ range("A1",rng.offset(0,3)).Address(external:=True ) -- Regards, Tom Ogilvy "Jeff" wrote in message ... I need a macro that will automatically find the row with the last entry and set the print range to that row and then print. Assuming columns A through D will contain data, what would the VBA code look like? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to print a cell range | Excel Discussion (Misc queries) | |||
print out specified range in macro | Excel Discussion (Misc queries) | |||
Macro to set print range | New Users to Excel | |||
Print range macro | Excel Discussion (Misc queries) | |||
Macro print range | Excel Programming |