+ Reply to Thread
Results 1 to 3 of 3

VBA for Printing to PDF with selected print range based off of a Cell Value

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    VBA for Printing to PDF with selected print range based off of a Cell Value

    I have some code that will print to pdf. I have some code that will print a selected range based off of a cell value but I don't know how to make it print the selected range as a pdf. I have attached a sheet as an example. I want it to print the ranges defined in the macro depending on cell "R1" to a pdf. I don't have all of the ranges defined, but this is a starter. I am The print to pdf is just code I found on the internet. Any help would be greatly appreciated.

    Please Login or Register  to view this content.
    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,482

    Re: VBA for Printing to PDF with selected print range based off of a Cell Value

    You could use find to locate where R1 is located in column A, then set your print area.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: VBA for Printing to PDF with selected print range based off of a Cell Value

    Thank you very kindly. I did it a little different. I added this in and it works. Thanks again for the response.

    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. Help with adding a value based on which cell is selected in a range
    By kfo317 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-04-2017, 12:45 PM
  2. [SOLVED] Print selected rows based on cell data
    By sipa in forum Excel General
    Replies: 13
    Last Post: 10-02-2016, 04:08 PM
  3. Set print area of selected range then print preview if ok then print the document!
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 07:10 AM
  4. [SOLVED] Printing Selected Range to PDF/Paper
    By magnilan in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-30-2013, 10:37 PM
  5. Printing Selected Pages from Multiple Worksheets into One Print Job
    By KivanAtaris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2013, 03:20 PM
  6. Printing a Selected Range to a specified folder as PDF
    By Shea0416 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2012, 12:32 PM
  7. Replies: 1
    Last Post: 05-15-2006, 04:10 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