+ Reply to Thread
Results 1 to 7 of 7

Macro to print multiple tabs

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    Norwich
    MS-Off Ver
    Excel 2010
    Posts
    53

    Macro to print multiple tabs

    Please could someone help me with this dilema....

    I have an sheet called 'Input' and and in cells A1, A2, A3, A4, A5, A6 will each show a value between 1 and 25, I also have 25 additional sheets labelled 1 to 25.

    What I would like to do is to create a macro to print the tabs that are shown in cells A1 to A6, hope this makes sense?

    Thanks

    Jon

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to print multiple tabs

    Hi jono7gold,

    Try this:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    05-08-2013
    Location
    Norwich
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Macro to print multiple tabs

    Thanks Lewis, that works great. What I would also like if possible is to run a 2nd macro to do the same but save as PDF instead of printing, could you help out with a macro?

    Cheers

    Jon

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to print multiple tabs

    Hi Jon,

    You'll have to bear with me, because my version of Excel doesn't support creating PDF files. I've tested the following macros the best that I could. If you have a problem, I need to know the exact location of where the problem lies, and exactly what nasty error message Excel generated.

    Two macros follow:
    a. One creates a separate PDF file for each sheet.
    b. The second creates one PDF file. Since I haven't been able to test, it is my understanding from research, that you may have to have a PAGE SEPARATOR (at the end of each sheet).

    All the output files will be in the same folder as the file the macros are in.

    Please Login or Register  to view this content.
    You will also need the following macro that was included in my previous post. If you put these macros in the same file as the macros for the previous post, DO NOT INCLUDE this macro. Having the same macro twice in one Excel file, may cause Excel to LOCK UP.
    Please Login or Register  to view this content.
    Lewis

  5. #5
    Registered User
    Join Date
    05-08-2013
    Location
    Norwich
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Macro to print multiple tabs

    Thank you Lewis for your time and input, these both work now. Would it be possible to modify the Save as one PDF macro so it opens the Save As dialogue box so I can choose the choose the location and file name?

    Many thanks

    Jon

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to print multiple tabs

    Jon,

    I'm so happy the previous posts worked, because I wasn't able to test them. Try the following macro which has two supporting macros. The 'LJMFileExists()' macro from the previous post(s) is also needed.

    Lewis

    New code in red
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-08-2013
    Location
    Norwich
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Macro to print multiple tabs

    Thanks Lewis, that worked perfectly, just exactly what I wanted.

    Jon

+ 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. print formatting for multiple tabs
    By [email protected] in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-07-2013, 07:18 PM
  2. Replies: 6
    Last Post: 02-01-2012, 05:29 PM
  3. How to print multiple tabs?
    By famico78 in forum Excel General
    Replies: 2
    Last Post: 12-22-2008, 11:50 AM
  4. [SOLVED] Print multiple tabs on one page
    By excelQ in forum Excel General
    Replies: 2
    Last Post: 07-07-2005, 10:05 AM
  5. [SOLVED] set the print area print multiple tabs
    By veng in forum Excel General
    Replies: 5
    Last Post: 02-12-2005, 03:08 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