+ Reply to Thread
Results 1 to 2 of 2

Automatic File Saving

  1. #1
    Registered User
    Join Date
    10-03-2005
    Posts
    3

    Automatic File Saving

    Hello,

    I need a macro that will automatically save an excel file, with a unique file name each time, it would be good if it could put the date and time into the file name. If its not possible to put the date and time into the file name, then just generating a unique file name will be enough.

    How would I go about doing this ?

    Regards

    Stephen

  2. #2
    Dave Peterson
    Guest

    Re: Automatic File Saving

    dim myFileName as string
    myfilename = "C:\" & format(now,"yyyymmdd_hhmmss") & ".xls"
    Activeworkbook.saveas filename:=myfilename, fileformat:=xlworkbooknormal

    Or something like that.

    smoran wrote:
    >
    > Hello,
    >
    > I need a macro that will automatically save an excel file, with a
    > unique file name each time, it would be good if it could put the date
    > and time into the file name. If its not possible to put the date and
    > time into the file name, then just generating a unique file name will
    > be enough.
    >
    > How would I go about doing this ?
    >
    > Regards
    >
    > Stephen
    >
    > --
    > smoran
    > ------------------------------------------------------------------------
    > smoran's Profile: http://www.excelforum.com/member.php...o&userid=27753
    > View this thread: http://www.excelforum.com/showthread...hreadid=472964


    --

    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