Results 1 to 4 of 4

Need help in printing the macro.

Threaded View

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    Boston, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need help in printing the macro.

    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
    Last edited by arlu1201; 05-04-2013 at 11:19 AM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1