+ Reply to Thread
Results 1 to 8 of 8

Macro To save multiple Excel sheets to multiple (individual) PDF Files

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Macro To save multiple Excel sheets to multiple (individual) PDF Files

    Hi,

    I am aware of how to save a number of excel sheets to one single PDF, but what I want to be able to do is save 30 excel sheets that are within the same workbook, into 30 individual pdf's in a particular location.

    Any ideas on a macro to do this?

    Any help would be greatly appreciated as at the moment I am spending far too much time doing one by one!

    Thanks,
    Keith

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    Try something like this. Change the save path to suit. The sheet tab name is used as the PDF file name

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    AlphaFrog, thank you so much! this is amazing! I am going to save so much time and effort now! One more question... How do I get it to only save certain sheets as PDF? For example, I have 30 sheets overall and 10 are revenue sheets, 5 expense sheets. So in an ideal world it would know how to save the 15 sheets but not the remaining 15 sheets. At the moment I am saving every sheet down and then going into the directory to delete each of the "unwanted" sheets.
    Is there a way in the code of getting it to say only do this action if it contains "Rev" or "Exp"? Something like that which would help it exclude all of the others?

    Thanks again, even as it is this is a massive help!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    You're welcome.

    This saves the sheets as PDF if the sheet name contains "Rev"

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    AlphaFrog... thank you! Last Questions I promise! So how do I put in multiple cases (i.e. if the sheet name contains "Rev" or "Exp")? Also, Is it possible to add a message box at the end to get it to come up with "PDF Export complete" or something like that. I have been trying to adjust it, but keep getting errors...

    Thanks again, this is such a big help.

  6. #6
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    Managed to figure out the OR statement now, that works So just need to figure out a msg box on the end of it all to say it is done ??

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro To save multiple Excel sheets to multiple (individual) PDF Files

    AlphaFrog! Perfect, works like a dream! thank you for all your help!

+ 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. Replies: 2
    Last Post: 04-02-2015, 06:45 AM
  2. Replies: 2
    Last Post: 09-19-2013, 04:22 AM
  3. [SOLVED] Loop through multiple files, run macro, then save as Excel workbook in a different folder
    By Peter Kallio in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-26-2013, 11:42 PM
  4. Replies: 2
    Last Post: 05-06-2013, 06:41 PM
  5. Help importing multiple text files to individual sheets in an excel workbook
    By cham.miller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2010, 06:55 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