+ Reply to Thread
Results 1 to 4 of 4

Need help in printing the macro.

Hybrid 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.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Need help in printing the macro.

    What does out of focus mean?
    Ben Van Johnson

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Need help in printing the macro.

    Hi Nings

    And what does this mean
    I am working on Mac book and also on windows
    Are you running a Virtual Machine on your Mac? If so, it will/should not make a difference...do it every day...all day.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

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

    Re: Need help in printing the macro.

    Hello protonLeah ,

    Out of focus means, when I am trying to print the page even after recording the page dimensions I am not able to get everything on one page. I have to go into Print options and adjust scaling to appropriate percentage to get everything on one page. I am doing this every time when ever I am printing page. The macro is used by a set of people and they don't want to go and adjust the scaling every time they use. Is there a solution to fix this problem. I tried many dimensions and nothing seems to be working on my side.

    Hello jaslake,
    I am using the macro on Mac book and also in windows laptop and experiencing the same problem. I am not using virtual machine.

+ Reply to Thread

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