+ Reply to Thread
Results 1 to 3 of 3

wksht name as current date - m-d-yy

  1. #1
    Registered User
    Join Date
    11-29-2005
    Posts
    6

    wksht name as current date - m-d-yy

    wksht name as current date - m-d-yy
    I'd like to add coding to an existing macro that names the current worksheet, based on the current date, i.e. m-d-yy format. I assume there's some date (object?) that will need to be set as a variable, from which I'll need to extract the month-day-year parts of the date, put them all into a string, and rename the worksheet? Just not familiar enough yet with which objects, properties, etc. to use to accomplish this. Can you help? Thanks!

  2. #2
    Andrew Taylor
    Guest

    Re: wksht name as current date - m-d-yy


    Craig,

    The line

    ActiveSheet.Name = Format(Now, "m-d-yy")

    should do what you want.

    Andrew Taylor

    craig_100 wrote:
    > wksht name as current date - m-d-yy
    > I'd like to add coding to an existing macro that names the current
    > worksheet, based on the current date, i.e. m-d-yy format. I assume
    > there's some date (object?) that will need to be set as a variable,
    > from which I'll need to extract the month-day-year parts of the date,
    > put them all into a string, and rename the worksheet? Just not familiar
    > enough yet with which objects, properties, etc. to use to accomplish
    > this. Can you help? Thanks!
    >
    >
    > --
    > craig_100
    > ------------------------------------------------------------------------
    > craig_100's Profile: http://www.excelforum.com/member.php...o&userid=29187
    > View this thread: http://www.excelforum.com/showthread...hreadid=494142



  3. #3
    Registered User
    Join Date
    11-29-2005
    Posts
    6

    Thanks

    That did exactly what I wanted. Thanks very much!

+ 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