+ Reply to Thread
Results 1 to 2 of 2

Export to PDF and have columns 1 to 15 on page 1 and 16 to 30 on page 2

  1. #1
    Registered User
    Join Date
    07-05-2017
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    19

    Export to PDF and have columns 1 to 15 on page 1 and 16 to 30 on page 2

    On a worksheet in excel I have a macro which nicely create a PDF's.
    The PDF is on 2 pages in landscape.

    What I do need is to have a specific number of columns on the first page, lets say 1 to 15 and columns 16 tot 30 on page 2.
    Now sometimes 1 to 12 is on page 1 and 13 to 30 on page 2 or 1 to 17 on page 1 and 18 to 30 on page 2. It is apparently depending on the contents of the columns.

    Part of my code where this should be realized is here I suppose, but I can not figure out how to do this.

    With ActiveSheet.PageSetup
    .PrintTitleRows = "$3:$3"
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
    .CenterHorizontally = True
    .Orientation = xlLandscape
    .FitToPagesWide = 0
    End With
    Application.PrintCommunication = True


    Pleased to hear.
    Berend-Jan

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,180

    Re: Export to PDF and have columns 1 to 15 on page 1 and 16 to 30 on page 2

    Why not go to the View Ribbon, select Page Break Preview and move the page break to where you want it?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] excel macro to export does not fit everything on 1 page.
    By michael123vba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2017, 07:55 PM
  2. Export to PDF and Fit all on One Page
    By wvtn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2017, 07:08 PM
  3. Replies: 0
    Last Post: 11-10-2016, 10:18 AM
  4. export single page to pdf
    By KS75f in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2015, 01:51 PM
  5. Export to PDF page sizing
    By dantray02 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2014, 04:44 AM
  6. Export to excel from Web page
    By velkugan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2010, 03:51 AM
  7. [SOLVED] Export data saving page set ups
    By PiPPo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2005, 02:05 PM

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