+ Reply to Thread
Results 1 to 9 of 9

Save some of the worksheets as PDF

  1. #1
    Registered User
    Join Date
    07-04-2021
    Location
    India
    MS-Off Ver
    2013
    Posts
    17

    Save some of the worksheets as PDF

    Hello,

    Need Help!!

    I need to save some of my spreadsheets of one excel file as a single PDF file.

    Modified the following code obtained from the internet as per my requirement. However, I want the PDF file to be saved in the same location where my excel file is saved.

    can someone please help me in this regard?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Save some of the worksheets as PDF

    Change this

    Please Login or Register  to view this content.
    to this

    Please Login or Register  to view this content.
    to save the pdf files in the same folder as the XL file.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    07-04-2021
    Location
    India
    MS-Off Ver
    2013
    Posts
    17

    Re: Save some of the worksheets as PDF

    it is giving me Path/File access error

    Please Login or Register  to view this content.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,165

    Re: Save some of the worksheets as PDF

    You have not specified your file name...
    Please Login or Register  to view this content.
    Last edited by sintek; 08-25-2021 at 07:51 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    07-04-2021
    Location
    India
    MS-Off Ver
    2013
    Posts
    17

    Re: Save some of the worksheets as PDF

    my file's name will be dynamic and so the location. it will be used by multiple users . so specifying the file name will be difficult

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,165

    Re: Save some of the worksheets as PDF

    so specifying the file name will be difficult
    Still need a file name...Even if it is stored in a cell to be referenced...

  7. #7
    Registered User
    Join Date
    07-04-2021
    Location
    India
    MS-Off Ver
    2013
    Posts
    17

    Re: Save some of the worksheets as PDF

    tried the above solutions but this code is only creating a folder name PDFs on the desktop. it is not creating the pdf file on the source location of the excel file'

    Please Login or Register  to view this content.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Save some of the worksheets as PDF

    Please Login or Register  to view this content.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,165

    Re: Save some of the worksheets as PDF

    Still does not solve your Post 5 problem though...

+ 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. Save WorkSheets as PDF
    By TimlmiT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2019, 02:38 PM
  2. Save only certains worksheets
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2017, 09:31 AM
  3. [SOLVED] Save Visible WorkSheets Only
    By Hood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2017, 10:30 AM
  4. How to save more than one but not all worksheets?
    By ksagermann in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-20-2011, 04:58 PM
  5. Save Worksheets as CSV
    By jregan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2010, 07:11 AM
  6. Save worksheets into new workbook
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2010, 07:43 PM
  7. Save worksheets as PDF
    By Edward HS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2008, 10:07 AM

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