+ Reply to Thread
Results 1 to 7 of 7

Print multiple worksheets - each worksheet to a separate pdf

  1. #1
    Registered User
    Join Date
    01-07-2021
    Location
    Ottawa, Canada
    MS-Off Ver
    2007
    Posts
    4

    Print multiple worksheets - each worksheet to a separate pdf

    Hi there.

    I am using Excel 2007. I have a work book with 200 worksheets and want to print each of the worksheets as a separate pdf. I do have the full version of acrobat.
    Is this possible without going into each worksheet separately and clicking print?

    While I'm at it here's another question. All 200 of the worksheets have a different number of rows. There are 2 heading rows at the top of each sheet, and then anywhere from 2-40 rows following those that include 3 columns of numbers (currency) I need sums for all of them. I've already done it all with the autosum function, but had to do it on 200 separate worksheets. It would be easy if all of the worksheets had the same number of rows, but they don't. Any ideas or suggestions?

    Thanks

    Ron
    Attached Files Attached Files
    Last edited by ronaldelias; 01-08-2021 at 03:18 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Print multiple worksheets - each worksheet to a separate pdf

    These solutions are attainable, but it would help us to help you if you could share an example workbook, as per the yellow banner above. Maybe you can share a workbook with 3 sheets?

  3. #3
    Registered User
    Join Date
    01-07-2021
    Location
    Ottawa, Canada
    MS-Off Ver
    2007
    Posts
    4

    Re: Print multiple worksheets - each worksheet to a separate pdf

    Thanks.

    I attached a small file to the original post.

    Ron

  4. #4
    Registered User
    Join Date
    01-07-2021
    Location
    Ottawa, Canada
    MS-Off Ver
    2007
    Posts
    4

    Re: Print multiple worksheets - each worksheet to a separate pdf

    I have found this VBA code that theoretically does exactly what I want, but i get a file error 11 and division by 0 error. Any ideas?


    Sub SaveAsPDF()
    Dim CurWorksheet As Worksheet
    For Each CurWorksheet In ActiveWorkbook.Worksheets
    CurWorksheet.ExportAsFixedFormat Type:=xlTypePDF, _
    Filename:=Application.ActiveWorkbook.Path & “\” & CurWorksheet.Name, _
    Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, _
    OpenAfterPublish:=False
    Next CurWorksheet
    End Sub

  5. #5
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Print multiple worksheets - each worksheet to a separate pdf

    Try

    Please Login or Register  to view this content.
    Still working on the sum of each page

  6. #6
    Registered User
    Join Date
    01-07-2021
    Location
    Ottawa, Canada
    MS-Off Ver
    2007
    Posts
    4

    Re: Print multiple worksheets - each worksheet to a separate pdf

    That works beautifully. Thank you VERY much!

    Ron

  7. #7
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Print multiple worksheets - each worksheet to a separate pdf

    To add the sum

    Please Login or Register  to view this content.

+ 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. Need to extract data from multiple worksheets and place in a separate worksheet
    By chuck_p in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2014, 01:56 PM
  2. Replies: 2
    Last Post: 10-14-2012, 10:00 AM
  3. [SOLVED] VBA to save multiple worksheets as separate CSV files using name of worksheet
    By Yg74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 10:55 AM
  4. VBA to save multiple worksheets as separate CSV files using name of worksheet
    By titushanke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 08:08 AM
  5. Print multiple selected worksheets to separate PDF's
    By Samantha McNeill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2010, 07:38 PM
  6. [SOLVED] separate worksheet into multiple worksheets by grouping
    By BPM001 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2005, 10:50 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