+ Reply to Thread
Results 1 to 7 of 7

Save pivot as a pdf and name it according to the value in a cell

  1. #1
    Forum Contributor
    Join Date
    01-27-2016
    Location
    Greenville,NC
    MS-Off Ver
    Excel 2013
    Posts
    124

    Save pivot as a pdf and name it according to the value in a cell

    Really Struggling. Below is what I have so far. I got this code to run correctly once and have not been able to get it to run correctly again.

    Please Login or Register  to view this content.
    I know what I am missing needs to go there between the " and .pdf", Quality part. I have one filter in my pt. The value of the filter is in cell B2.. all i want to do is save the pdf as the value of the filter name in cell B2 and have it save to directory instructed.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Save pivot as a pdf and name it according to the value in a cell

    Looks like a syntax error to me.

    Please Login or Register  to view this content.
    Last edited by dflak; 05-11-2018 at 12:50 PM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    01-27-2016
    Location
    Greenville,NC
    MS-Off Ver
    Excel 2013
    Posts
    124

    Re: Save pivot as a pdf and name it according to the value in a cell

    Yes. That's the error I keep getting, but how to fix it.

  4. #4
    Forum Contributor
    Join Date
    01-27-2016
    Location
    Greenville,NC
    MS-Off Ver
    Excel 2013
    Posts
    124

    Re: Save pivot as a pdf and name it according to the value in a cell

    Instead of My File Name, how tell it to pull the value from the filter in the pivot table (Cell B2) and make that the name of the pdf file.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Save pivot as a pdf and name it according to the value in a cell

    If Cell B2 has "My File Name.pdf" in it, then it becomes:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-27-2016
    Location
    Greenville,NC
    MS-Off Ver
    Excel 2013
    Posts
    124

    Re: Save pivot as a pdf and name it according to the value in a cell

    Your method seems completely logical, but I keep getting Automation error.. The filename, directory name, or volume label syntax is incorrect. Run time error

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Save pivot as a pdf and name it according to the value in a cell

    I'll have to see the rest of the workbook.

    At Sheets("SheetName") you should be using your own sheet name. If you eliminate this, the program will look at cell B2 on whatever sheet it thinks is current.

+ 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. Excel doesn't change the cell format on save through the workbook save button
    By mitko1994 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-16-2017, 03:09 PM
  2. Pivot Table and Cell Type won't save formatting when refreshing
    By lborja in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-11-2015, 11:18 AM
  3. Save Pivot Table Layout
    By OJNS in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-08-2014, 06:49 AM
  4. Macro with cell reference as a name, but prompt for save location and save as csv
    By tomham in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2012, 06:21 PM
  5. How do I save a pivot table and
    By kickballMVP2006 in forum Excel General
    Replies: 1
    Last Post: 11-04-2006, 07:10 AM
  6. [SOLVED] How can I save a pivot table layout?
    By Rob B in forum Excel General
    Replies: 4
    Last Post: 08-03-2006, 08:10 AM
  7. Loosing My Pivot Tables during SAVE AS
    By LostintheJungle in forum Excel General
    Replies: 1
    Last Post: 02-16-2005, 02:49 PM

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