+ Reply to Thread
Results 1 to 4 of 4

Save excel file as current date

  1. #1
    Registered User
    Join Date
    01-16-2005
    Posts
    5

    Cool Save excel file as current date

    I want to write code to save an excel file with the current date as the file name each day automatically.

    Please Help

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Hi,

    Not tested but you can try.
    You need to change the file path.

    Sub mydate()
    Dim fd As Date
    fd = Date
    ActiveWorkbook.SaveAs Filename:="G:\users\cc\" & fd
    End Sub


    HTH

    Charles

  3. #3
    Registered User
    Join Date
    01-16-2005
    Posts
    5

    Thumbs up Thanks

    Thanks Charles I will give it a try.

  4. #4
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    webbey21,

    You may have problems with the date format.

    Try this

    Dim fd
    fd = Format(Now(), "mm-dd-yy")
    ActiveWorkbook.SaveAs Filename:= _
    "C:\Documents and Settings\Charles Harmon\My Documents\" & fd

    Charles

+ 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