Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    543
    Thanks
    56
    Thanked 0 Times in 0 Posts

    Macro to print 2 areas from spreadhseet with different titles

    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?
    Last edited by RetiredGeek; 2014-02-25 at 17:15. Reason: Added Code Tags
    cheers

    Phil Carter

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    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...meraExcel.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

Posting Permissions

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