+ Reply to Thread
Results 1 to 10 of 10

Save Current Worksheet as PDF

  1. #1
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Smile Save Current Worksheet as PDF

    Hey all,

    [view sample spreadsheet]

    I have a spreadsheet that is quite wide. I am trying to print a report [pdf] of the data. The report would have multiple pages rather than shrinking to one page.

    I currently have a code but this works only on sheets with one page. Is there anyway to edit this code I have so it detects all the data to the right and adds it on subsequent pages to my PDF report? I am open to doing this anyway that works.

    I have a preference to keep each table on it's own page, rather than breaking it up cause it doesn't fit in the margins.


    Would appreciate any help i can get, even if it is just advice

    All the best guys!
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Save Current Worksheet as PDF

    Even though it is called "Save to PDF" it is still "Printing to PDF", whatever your print settings are will be how the sheet PDF's, you may have to place the tables below each other and use page breaks

  3. #3
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Save Current Worksheet as PDF

    Gotcha appreciate your comment. I am a little too new to be able to dynamically create the print area through code. A little over my head not coming forma coding background. Do you have any ideas or help for me?

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

    Re: Save Current Worksheet as PDF

    Try this...

    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.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Save Current Worksheet as PDF

    Hello .. Thanks a lot Mr. AlphaFrog for this wonderful code ..
    What about this change so as to make each range to be printed into one page
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Save Current Worksheet as PDF

    This is a sample
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Save Current Worksheet as PDF

    You guys are so helpful. I appreciate your time you took to help me. AlphaFrog and YasserKhalil you're awesome seriously

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Save Current Worksheet as PDF

    You're welcome ..
    And thanks a lot for Mr AlphaFrog for his great efforts in the forum
    Best Regards for all of you

  9. #9
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Save Current Worksheet as PDF

    Quote Originally Posted by YasserKhalil View Post
    You're welcome ..
    And thanks a lot for Mr AlphaFrog for his great efforts in the forum
    Best Regards for all of you
    Hey Yasser, how do I change the file path ont his code. I can't seem to figure out where you guys embedded it

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Save Current Worksheet as PDF

    Hello
    Sorry for changing .. for test purposes
    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. [SOLVED] VBA Save Worksheet With Current Date as Suffix
    By Swoootie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2014, 10:23 AM
  2. How to use a macro to save worksheet as pdf to current folder
    By lriver2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2013, 05:03 PM
  3. Code to save current worksheet and hidden worksheet
    By fusion007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2011, 02:28 PM
  4. Save current worksheet
    By craig mullen in forum Excel General
    Replies: 1
    Last Post: 05-22-2007, 02:07 PM
  5. Replies: 1
    Last Post: 04-07-2006, 07:54 AM
  6. How to save the current worksheet as JPEG, TIFF or DICOM?
    By DORI in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-23-2005, 02:55 AM
  7. Adding a worksheet from a date named workbook and save as current
    By Lynn Bales in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2005, 09:05 AM

Tags for this Thread

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