Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
Appears my b4 print event is not working. When I print I receive no right header or center footer I tried commenting out the .rh and .cf out of the print routine Received same results Private Sub Workbook_BeforePrint(Cancel As Boolean) Worksheets("Main").Activate With ActiveSheet.PageSetup .RightHeader = ActiveSheet.Range("C1").Value .CenterFooter = ActiveSheet.Range("C2").Value End With End Sub Print Routine: Sub Print_Main() Application.ScreenUpdating = False Worksheets("Main").Select Range("B4:J47").Select ActiveSheet.PageSetup.PrintArea = "$B$4:$J$47" With ActiveSheet.PageSetup .PrintTitleRows = "" .PrintTitleColumns = "" .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "&8&D" .CenterFooter = "" .RightFooter = "&8&T" .LeftMargin = Application.InchesToPoints(0.75) .RightMargin = Application.InchesToPoints(0.75) .TopMargin = Application.InchesToPoints(1) .BottomMargin = Application.InchesToPoints(1) .HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.5) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = False .CenterVertically = False .Orientation = xlPortrait .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = True .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 .PrintErrors = xlPrintErrorsDisplayed End With ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Range("D7").Select Application.ScreenUpdating = True End Su -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Don
There is a . before each item within the With statement. Any other ideas? --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Event not working on 1 machine | Excel Discussion (Misc queries) | |||
Print a range when an event happens | Excel Discussion (Misc queries) | |||
worksheet change event not working | Excel Discussion (Misc queries) | |||
Workbook_Open event not working | Excel Programming | |||
Worksheet_Change Event Not Working | Excel Programming |