+ Reply to Thread
Results 1 to 2 of 2

VBA-print as pdf w/ filename from a cell, & print in folder excel file is located

Hybrid View

  1. #1
    Registered User
    Join Date
    01-04-2017
    Location
    Socal
    MS-Off Ver
    2013 excel
    Posts
    4

    Post VBA-print as pdf w/ filename from a cell, & print in folder excel file is located

    Hello VBA bothers and sisters,
    I would like to write vba code and then create a button that prints 1 or 2 excel worksheets as pdf and then have the pdf file print in the folder that the excel file is currently located in.
    I would like the name of the file to come from a value in a cell A1.
    The cell with the file name would come from a separate worksheet then the two sheets I want to print as pdf.
    Specifics
    1) the file name would come from worksheet named "estimator"
    2) The two worksheet that I want to print as pdf are: "catwalk quote PG-1" and "catwalk quote PG-2."
    3) I want to place a command button on "catwalk quote PG-1"
    4) I want the pdf file to print in the current file path that the excel sheet is located in.
    Can anyone help?

    Thanks,
    Noel
    Last edited by wpssnotoq; 01-26-2017 at 05:31 PM.

  2. #2
    Registered User
    Join Date
    01-26-2017
    Location
    In the world
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: VBA-print as pdf w/ filename from a cell, & print in folder excel file is located

    Hi Noel

    I just asked a very similar question yesterday then managed to solve it myself. You'll find my thread with the code here: http://www.excelforum.com/showthread...98#post4569498

    My requirements were a bit more complicated than yours so you should be able to easily adapt it. I've commented the code as much as I can. Hope it helps.

+ 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. appending a text file from the same folder where excel file is located
    By np1966 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2017, 10:11 PM
  2. ExecWB to print webpages to PDF - automate print file filename
    By Kevin_N_PA in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2016, 07:42 PM
  3. Replies: 1
    Last Post: 09-22-2015, 02:22 PM
  4. Replies: 0
    Last Post: 09-06-2013, 02:16 AM
  5. Replies: 9
    Last Post: 04-18-2012, 08:50 AM
  6. [SOLVED] Excel - print to .pdf using filename reference from cell
    By scooppbear in forum Excel General
    Replies: 1
    Last Post: 05-16-2006, 09:36 PM
  7. How do I print a filename at the end of the file (not every page)
    By sanfranson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2006, 11:35 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