• Macro to print 2 areas from spreadhseet with different titles

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Macro to print 2 areas from spreadhseet with different titles

    Author
    Topic
    #493547

    We have a requirement to print a landscape report from a spreadsheet that contains 2 titles B2:C5 & Q2:AK5 and 2 data areas Q2:AK45 & Q86:AK108

    Can do this fine for single areas where code has been recorded by someone in the past

    Code:
    Sub IBPreviousYr()
    '
    '
        Application.Goto Reference:="IBPreviousYr"
        With ActiveSheet.PageSetup
            .PrintTitleColumns = "$B2:$C45"
            .Orientation = xlPortrait
        End With
        ActiveSheet.PageSetup.PrintArea = "$BA$2:$BL$45"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
            IgnorePrintAreas:=False
        Sheets("Printing").Select
    End Sub
    

    Anyone any ideas?

    Viewing 0 reply threads
    Author
    Replies
    • #1441057

      If you want to print multiple areas on one sheet, you will have to combine them into one sheet. I find the camera tool (see https://www.airweb.org/eAIR/techtips/Pages/CameraExcel.aspx for adding the camera tool and using it).

      After adding the tool, select the first range and take a picture and place it on a blank sheet, then take a picture with the camera tool of the second range and place it underneath (or next to depending on your desire) the first range. Then print this sheet and the ranges on it.

      Steve

    Viewing 0 reply threads
    Reply To: Macro to print 2 areas from spreadhseet with different titles

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: