+ Reply to Thread
Results 1 to 2 of 2

File Name as Date and Time

  1. #1
    Registered User
    Join Date
    01-09-2006
    Posts
    1

    File Name as Date and Time

    Im racking my brain here trying to figure out a way to build a macro that will save a spreadsheet as a date and time. Anyone have a solution?

    Basicly I want to have a macro thats move the current data out of one wook sheet to another wook book and save it. The file name will have to change everytime this happens. Perferably the date and time. Its this unique file name that Im stuck on.

  2. #2
    Dave Peterson
    Guest

    Re: File Name as Date and Time

    Activeworkbook.saveas _
    filename:="C:\test\" & format(now,"yyyy_mm_dd__hh_mm_ss") & ".xls"

    You don't need to get the date/time out of a worksheet.



    Tasar wrote:
    >
    > Im racking my brain here trying to figure out a way to build a macro
    > that will save a spreadsheet as a date and time. Anyone have a
    > solution?
    >
    > Basicly I want to have a macro thats move the current data out of one
    > wook sheet to another wook book and save it. The file name will have to
    > change everytime this happens. Perferably the date and time. Its this
    > unique file name that Im stuck on.
    >
    > --
    > Tasar
    > ------------------------------------------------------------------------
    > Tasar's Profile: http://www.excelforum.com/member.php...o&userid=30272
    > View this thread: http://www.excelforum.com/showthread...hreadid=499401


    --

    Dave Peterson

+ 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