I am having problem in printing the excel sheet as the print layout is out of focus. Can anyone help me fix this?
Below is the code which I am working with. I am working on Mac book and also on windows does that make any difference?
But the page layout seems to be same on both the devices.
![]()
Sub Avail() ' ' Macro3 Macro ' ' Cells.Select With Selection.Font .Name = "Arial" .Size = 12 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone End With With Selection.Font .Name = "Arial" .Size = 9 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone End With Range("A1:R1").Select Selection.Font.Bold = True Cells.Select Cells.EntireColumn.AutoFit Range("C9").Select With ActiveSheet.PageSetup .PrintTitleRows = "$1:$1" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "&""Arial,Bold""&K000000Availability &D" .RightHeader = "" .LeftFooter = "&""Arial""&K000000&P of &N" .CenterFooter = "" .RightFooter = "" .LeftMargin = Application.InchesToPoints(1) .RightMargin = Application.InchesToPoints(0.25) .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 = Array(240, 140) .CenterHorizontally = False .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 End With ActiveWindow.View = xlPageLayoutView ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub
Bookmarks