+ Reply to Thread
Results 1 to 3 of 3

Save to .pdf named after cell value with date in it

  1. #1
    Forum Contributor
    Join Date
    07-27-2012
    Location
    Somerset, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    123

    Save to .pdf named after cell value with date in it

    I'm using this code:
    Please Login or Register  to view this content.
    The problem is, cell "R4" has a date in so it's giving me an error. It works fine for any cell without a date in it.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Save to .pdf named after cell value with date in it

    Hi there,

    See if the attached version of your code does what you need:

    Please Login or Register  to view this content.
    The code converts the date from Cell R4 to a text string with a format of "yyyy-mm-dd". Formatting date values in this way means that filenames which include such dates appear in reverse chronological order when viewed in a file manager.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Save to .pdf named after cell value with date in it

    Thread marked as "Solved", but not even acknowledged.

+ 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. Referencing a cell from a workbook that is named by date
    By travis.cook21 in forum Excel General
    Replies: 3
    Last Post: 08-06-2015, 04:23 PM
  2. [SOLVED] VBA coding: macro to create a new sheet and have it named by data in a cell and the date
    By Apollo7242 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2015, 04:34 PM
  3. [SOLVED] Macro to save file - save name from cell containing a date using different date formatting
    By d_max_c in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2014, 12:18 PM
  4. [SOLVED] VBA - Open Save As dialogue box - to save named range
    By Jabba69 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2014, 10:34 AM
  5. command button 1 (save as pdf named the current time and date . then send by email
    By guitarist00 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-02-2013, 09:43 AM
  6. Replies: 0
    Last Post: 10-10-2012, 03:51 AM
  7. Adding a worksheet from a date named workbook and save as current
    By Lynn Bales in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2005, 09:05 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