+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 - Select Save as type: PDF

  1. #1
    Forum Contributor
    Join Date
    06-06-2012
    Location
    Toronto, ON
    MS-Off Ver
    Office 365
    Posts
    138

    Excel 2010 - Select Save as type: PDF

    Hello,

    I found allot of ways to do this online, but not quite what Im looking for....I have a userform with a save as pdf button....Ideally when the user clicks the button, Id like it to automatically save as a pdf and also Id like it to print portrait as well....I was using this code:

    but it didn't something a little different than what I want:
    http://www.mrexcel.com/forum/excel-q...me-path-2.html

    Here is my currect code for the save as pdf button........Has anyone ever done this before, and have any insight as to how to do it:
    Regular Module:
    Please Login or Register  to view this content.

    In the Command button on the userform:
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    06-06-2012
    Location
    Toronto, ON
    MS-Off Ver
    Office 365
    Posts
    138

    Re: Excel 2010 - Select Save as type: PDF

    Hello,

    So this works, top of the userform, only thing now is it prompts you to delete the screen capture from the worksheet, Id like to stop that prompt and have it just auto-trigger the delete button from the prompt. Is there a way to do that?

    Thanks again for the help!


    Please Login or Register  to view this content.
    Using this for the print button:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-06-2012
    Location
    Toronto, ON
    MS-Off Ver
    Office 365
    Posts
    138

    Re: Excel 2010 - Select Save as type: PDF

    I also found this code, but I cant really understand it, but what it does is create another userform - thats a PDF Viewer, then I assume it triggers a print, but I dont completely understand it, this is the one Im trying to make work for me though...Oh I guess I should indicate my error...The error I get when executing this code is:

    "Compiler error - User defined type not defined" and its highlighting the section "Dim PDForm As AcroPDF" - Im also referencing all the correct libraries in VBE.

    ...At the top of your userform its this code:

    Please Login or Register  to view this content.
    Then on your command button code that triggers the 'save as pdf'

    Please Login or Register  to view this content.
    Last edited by excelenergy; 04-11-2014 at 01:38 PM.

+ 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. type mismatch 13 in excel 2010
    By desonny in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2014, 04:57 AM
  2. Error 13 type mismatch in excel 2010
    By excelbugs_help in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2013, 05:56 AM
  3. excel 2010 vba to save access 2010 database and close it
    By dearnemo385 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2012, 11:56 AM
  4. Replies: 1
    Last Post: 01-23-2012, 03:16 AM
  5. Disable Save/Save As in Excel 2010
    By toddp in forum Excel General
    Replies: 2
    Last Post: 09-22-2011, 03:36 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