+ Reply to Thread
Results 1 to 4 of 4

Saving a copy of Excel file daily with current date - How to?

  1. #1
    Registered User
    Join Date
    10-12-2017
    Location
    Den Haag, Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Saving a copy of Excel file daily with current date - How to?

    HI,

    I have an Excel file named Daily.xls (Excel 2007) in a directory c://Data

    this file is being changed every day. I need that the file is saved once daily (when it is open first time on a day) with the current date (in the form year-month-day) added to the file name, i.e. Daily_year-month-day.xls
    in the directory c://Data/Archive

    The original file Daily.xls should stay in the original directory c://Data
    and it should be possible to open it, change data in it and save it during the day, without making a copy Daily_year-month-day.xls every time it is open during the day.

    What would be the easiest way to do this automatically.

    Thanks for your help.

    Filipana
    Last edited by filipana; 10-12-2017 at 07:53 AM.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,173

    Re: Saving a copy of Excel file daily with current date - How to?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-12-2017
    Location
    Den Haag, Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Re: Saving a copy of Excel file daily with current date - How to?

    Thanks a lot!

  4. #4
    Registered User
    Join Date
    10-12-2017
    Location
    Den Haag, Netherlands
    MS-Off Ver
    2007
    Posts
    3

    Re: Saving a copy of Excel file daily with current date - How to?

    when I make a macro exactly according to the ranman256 suggestion in Module1 and
    make VBR command under thisworkbook (Code) to try to automate so that a copy will be made every time that I open the file Daily by writing in the window thisworkbook (Code) :

    Private Sub Workbook_Open()

    Call SaveDailyFile()

    End Sub

    I get a copy in c:\data\archive\Dailyyymmdd-hhhh.xlsx
    but the workbook does not open.
    What am I doing wrong?

    If I try to execute Macro manualy (F5) I get a message that this file ending kann not be used with the chosen data type and that I should choose another file ending in the text field Filename or I should choose another data type by changeing the option SaveAs.

    Thanks again.

    Filipana

    Thanks also for helping with my first trials in Macro-Using (obviously :-) ).

    P.S. Oh yes, another question:
    How do I get it that when the files saved in c:\data\archive by opening do not execute macro and make another copy of the file in the same directory?
    Last edited by filipana; 10-18-2017 at 03:49 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Saving MASTER file, automatically remove part of file name and append current date?
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-10-2014, 08:13 AM
  2. Replies: 0
    Last Post: 05-17-2014, 04:21 PM
  3. Saving file to its current location and current file name with current date and "FINAL"
    By ironwill20 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 03:22 AM
  4. [SOLVED] Saving temporary text file to particular location with the name of current Date and Time
    By muralidaran in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-06-2012, 10:46 AM
  5. adding current date then after saving the file current date function stops
    By gotbitey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2011, 02:15 PM
  6. Auto Saving File to Folder with Current Date
    By mengghee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2008, 05:50 PM
  7. [SOLVED] Make date change in excel to current date when opening daily?
    By jamie in forum Excel General
    Replies: 3
    Last Post: 03-01-2006, 11:40 AM

Tags for this Thread

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