+ Reply to Thread
Results 1 to 6 of 6

Macro to export to PDF but also re arrange the tab order

  1. #1
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Macro to export to PDF but also re arrange the tab order

    Hi everyone,

    I found a useful thread on here that shows how to export to PDF and it works well, but when I export 7 tabs to a PDF, the order of the PDF pages isn't ideal. I imagine I could change the order a few different ways, such as writing code to copy the excel file, then rearrange the tabs, then save as PDF and finally close the copy without saving. Do you think this would be a good approach? How would you write this type of macro? Let's call the 7 tabs: Summary, Summary 2, Summary 3....Summary 7

    Thanks

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Macro to export to PDF but also re arrange the tab order

    It sounds like this is not what you want although the Sheets in your Post are in sequence.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to export to PDF but also re arrange the tab order

    Ah yes, but the order would need to be Summary 7, Summary 6..etc

    I tried re ordering the array and it didn't work, I think I would have to use the Move.Sheet method

    Thank you

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Macro to export to PDF but also re arrange the tab order

    If the sheets to be printed are not in sequence in your workbook, try this.
    Put the sheets to be printed in shArr2 in order you want them printed to PDF

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to export to PDF but also re arrange the tab order

    This worked.

    The order of the Array didn't result in the same order for the PDF - For some reason PDF page 1 was array Summary spot 3, but I just changed the summary page order in the array to conform to what I was seeing in the end result and this code works perfectly.

    Thank you

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Macro to export to PDF but also re arrange the tab order

    If you're happy with it, that's all that counts
    Good luck

+ 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. change order of graphs when using macro to export all excel charts to powerpoint
    By silencer27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 06:48 AM
  2. Arrange in sequence order order whith selected filter
    By MAKEXAN12 in forum Excel General
    Replies: 9
    Last Post: 05-09-2013, 10:58 AM
  3. Replies: 0
    Last Post: 03-26-2013, 09:41 AM
  4. macro to arrange rows in numerical order using numbers in column
    By blairw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2013, 10:58 PM
  5. Macro - Arrange worksheets in custom order
    By WeeG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2012, 02:30 AM
  6. Arrange columns into set order
    By stawil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2011, 09:02 AM
  7. arrange cell order
    By norika in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2005, 04:59 AM

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