+ Reply to Thread
Results 1 to 2 of 2

Adding current year to a filename

  1. #1
    Forum Contributor
    Join Date
    06-06-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    129

    Adding current year to a filename

    I am trying to add the current year as part of the worksheet name for a new worksheet. I can't seem to get my code to add the year to the end of the file name. I want the code to end up with new sheet for workbook to be "File_Name_2018". Here is what I have so far.

    Please Login or Register  to view this content.
    All help is greatly appreciated!

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Adding current year to a filename

    Range("AJ6") = "File_Name_" & Format(Date, "yyyy")

+ 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. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  2. [SOLVED] Adding Current month and year to VBA generated text box
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2014, 03:32 AM
  3. Replies: 2
    Last Post: 03-14-2014, 08:47 PM
  4. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  5. [SOLVED] Keeping a date as current year, even though formula determines previous year
    By dropanddrive03 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 08:31 PM
  6. Replies: 4
    Last Post: 07-16-2012, 07:02 AM
  7. Help with formula of filename and saving filename as current time
    By hqradio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 06:10 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