+ Reply to Thread
Results 1 to 3 of 3

VBA Print PDF Code troubles

  1. #1
    Registered User
    Join Date
    12-31-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2013
    Posts
    9

    VBA Print PDF Code troubles

    Hi Guys,

    I have some buttons on my excel sheet that print my workbook. Ive recently added pdf printing to that list.

    I would like it to check if the pdf file exists, save pdf if it does not. Message box [Yes, No, Cancel] if it does exist, Yes: creates pdf, No: prompts SaveAs dialog, Cancel: ends without Pdf changes . It "almost" works.

    PROBLEM: If there is no PDF there it does not detect this. It always comes up with the dialog box.

    Guessing my learner skills are not what i think they are. (read: basterdise other people's code from online)

    Thanks for the help

    Please Login or Register  to view this content.
    Last edited by jonnyking; 01-16-2015 at 08:13 PM. Reason: Removed .xml extension appearing on pdf

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: VBA Print PDF Code troubles

    Use the Dir command
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    12-31-2014
    Location
    Vancouver, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: VBA Print PDF Code troubles

    Actually just figured this out myself about 5 mins ago. Thanks for confirming this is the way I should do it
    +rep'd

+ 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. Code troubles - Trying to copy a row to another sheet based on criteria, then delete
    By kurt1985 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-21-2014, 10:48 AM
  2. Code and Formula to print dynamic print area ranges
    By stpeter in forum Excel General
    Replies: 1
    Last Post: 10-15-2013, 03:33 PM
  3. [SOLVED] Need ‘Set Print Area’ Code for Dynamic Print Range based on Conditions
    By dosbirn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 12:13 PM
  4. [SOLVED] Print array code for a series of pages that will also determine print area required?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2012, 11:46 PM
  5. Code Troubles
    By merritts in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2006, 02:17 PM

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