+ Reply to Thread
Results 1 to 3 of 3

Current Month as Text in a File Name reference

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Morgantown
    MS-Off Ver
    Excel 2003
    Posts
    3

    Current Month as Text in a File Name reference

    All,

    I have a file that is currently titled: May Scrap Net of Reserve with scrap codes.xls

    I have a Macro that activates this file and applies various sorting and filtering. How would I define the "May" portion of that file name so as to allow it to update as each month, without users having to delve into the code? Below is the code I know how to define, with the "MonthName" portion that I need help with, highlited.

    [CODE]
    Filename = MonthName & "Scrap Net of Reserve with scrap codes" & ".xls"
    Filename.Activate
    [CODE]

    Thanks.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    2,308

    Re: Current Month as Text in a File Name reference

    Format(Now(), "mmm")

    that converts the current Month to 3 Characters....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    2,308

    Re: Current Month as Text in a File Name reference

    glad I could help....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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