+ Reply to Thread
Results 1 to 8 of 8

Export pdfs automatically from data validation list

  1. #1
    Registered User
    Join Date
    06-11-2020
    Location
    Stockholm
    MS-Off Ver
    2016
    Posts
    13

    Export pdfs automatically from data validation list

    Hi!

    I have a bunch of customers in a data validation list, and for each customer I have to export a one-pager to pdf. It takes me extremely long to do this, so I was wondering if there's a way to automatize it?

    My process as of now goes as follows:
    1. Choose the correct customer in the data validation list.
    2. Export onepager to pdf (here i click alt > F > E > A as I think this is the fastest way) > change file name > save
    3. choose the next customer in the list
    4. repeat above 46 times -_-

    I am not yet familillar with macros or VBA but am definitely willing to learn in the long run.

    Very grateful for your help!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,517

    Re: Export pdfs automatically from data validation list

    Short answer, yes, you can do this with VBA.

    Long answer, yes, but you'll need to provide a lot more information and, ideally, a sample workbook.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-11-2020
    Location
    Stockholm
    MS-Off Ver
    2016
    Posts
    13

    Re: Export pdfs automatically from data validation list

    Thanks for your quick reply!

    I have attached a sample workbook. Cell B1 holds the data validation list with each customer number - the list that the data is based on lies in sheet "Customers".
    For each customer number in the list, I'd like to export a pdf with the file name in cell G1, saved in a certain location.

    Did I provide enough information or did I miss something?
    Attached Files Attached Files
    Last edited by AliGW; 07-02-2020 at 10:23 AM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,517

    Re: Export pdfs automatically from data validation list

    OK, try this as a starter ...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-11-2020
    Location
    Stockholm
    MS-Off Ver
    2016
    Posts
    13

    Re: Export pdfs automatically from data validation list

    Holy smokes, look at that! It worked!! What a life saver.

    I very much appreciate that you took the time to actually write the code. Hopefully I'll get into VBA more soon, as I don't yet know the syntax and functions etc.

    Gonna make some edits to apply the same code to my actual workbook - guess we'll see if I encounter any issues then.

    Thank you so so much!

    Follow-up question: if I'd like to save the files in a different path, how should i write the path name? sPath = "C:\blah\blah" ?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,517

    Re: Export pdfs automatically from data validation list

    You're welcome.


    ... how should i write the path name? sPath = "C:\blah\blah" ?
    Yes.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Registered User
    Join Date
    06-11-2020
    Location
    Stockholm
    MS-Off Ver
    2016
    Posts
    13

    Re: Export pdfs automatically from data validation list

    Editing the path name as well as applying the code to my actual workbook worked well. Thanks again, have a lovely summer!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,517

    Re: Export pdfs automatically from data validation list

    You're welcome. Thanks for the rep.


    And thanks for the kind wishes ... looks like it will be an "interesting" summer

+ 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. Export as PDF every iteration of worksheet based on data validation list
    By kewellh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2019, 04:14 AM
  2. [SOLVED] DATA VALIDATION - automatically add to list?
    By Cam in forum Excel Formulas & Functions
    Replies: 31
    Last Post: 11-26-2016, 12:33 PM
  3. VBA export sheets as PDFs, merge with existing PDFs
    By wannabeexcelguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-26-2015, 07:32 PM
  4. [SOLVED] Data Validation List to automatically update
    By PDBartlett in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2014, 10:26 AM
  5. [SOLVED] Data validation list automatically shows the first item in the list
    By Alyena in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2013, 07:00 AM
  6. How to Automatically Add to a Data Validation List
    By ohlalayeah in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-31-2012, 07:21 AM
  7. Replies: 4
    Last Post: 05-17-2011, 06:07 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