Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting print area
try
botcell & " "nath" <n@n wrote in message ... Hi I am trying to write some code for a button to set the print area of a sheet to only include the relevant data. I have coded this so far With ActiveSheet.PageSetup ' Set up printing preferences .PrintArea = "$B$2:$" & col_name & "$" & botcell .Orientation = xlLandscape .FitToPagesWide = 1 .FitToPagesTall = 2 .CenterHeader = "4 Region BAAG report" End With where col_name is the last column of relevant data. Which comes from some earlier code. When i run this i get an error message saying that the print area can not be set. Can any one help? TIA Nath. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print Area Setting | Excel Discussion (Misc queries) | |||
Setting The Print-Area ? | New Users to Excel | |||
Setting print area | Excel Discussion (Misc queries) | |||
setting complex print area | Excel Programming | |||
setting complex print area | Excel Programming |