Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a macro that filters data to a worksheet I then want the user to view and print the filtered area if they want. So I have this macro that prints a thru k problem is it doesn't just print the area with data it keeps print all the way down the page. Can anyone tell me what I need to add to just print the area that changes. Sub PrintActiveSheet() ' ' PrintActiveSheet Macro ' Macro created 4/17/2005 by Jennifer S. Klever ActiveSheet.Unprotect 'Sort active range Worksheets("FilterDate").Range("A7").Sort _ Key1:=Worksheets("FilterDate").Columns("a"), _ Key2:=Worksheets("filterDate").Columns("b"), _ Header:=xlGuess 'Print range column a thru K ActiveSheet.PageSetup.PrintArea = "a" & SRow & ":K" & ERow With ActiveSheet.PageSetup .Orientation = xlLandscape .FitToPagesWide = 1 .BlackAndWhite = True .PrintComments = xlPrintNoComments .LeftFooter = "MFV" .RightFooter = "&d" .CenterHorizontally = True End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=True, collate:=True End Sub -- Though daily learning, I LOVE EXCEL! Jennifer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
File, print area, clear area, is not working | New Users to Excel | |||
print area across the freeze panes area | Excel Worksheet Functions | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |