+ Reply to Thread
Results 1 to 5 of 5

Auto save Excel file without prompt and create a backup copy

  1. #1
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    102

    Auto save Excel file without prompt and create a backup copy

    Dear Excel Guru’s,

    I need help to create a VBA code to save an Excel file without prompt upon exit and create another file as backup (Save As) with filename plus the current date.

    The file is save at G:\Data\Trans_Data.xlsb and the Save As file is to be save at Z:\Backup\Trans_Data MM-DD-YY.xlsb. If the file is Save at same date, overwrite the file without any prompt.

    Thank you in advance.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Auto save Excel file without prompt and create a backup copy

    Please Login or Register  to view this content.
    however could I recommend saving the date as format YY-MM-DD, this will ensure all files are sensibly ordered.

  3. #3
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Auto save Excel file without prompt and create a backup copy

    Thank you for your quick response.

    It’s working fine with few revision.

    When I open the file and re save it for the second time, it has a prompt “A file name….xlsb already exist in this location, do you want to replace it?”

    Is there a possibility of saving it without a prompt?

    Thank you.

  4. #4
    Forum Contributor
    Join Date
    12-01-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Auto save Excel file without prompt and create a backup copy

    Also, when I click “NO”, there is a Run time error 1004, method Save As object failed. Then there is END and DEBUG button.

  5. #5
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Auto save Excel file without prompt and create a backup copy

    Try this small adjustment to the code pjwhitfield gave you;
    Please Login or Register  to view this content.
    Last edited by Jim885; 10-27-2014 at 12:49 PM.
    If I helped in any way, please click the star

+ 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. Macro to Auto save a backup copy in a seperate location OR save file with a pop up
    By kdsanderson30 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2014, 12:38 PM
  2. Create backup copy of excel file in VB
    By t3623gl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2012, 03:57 PM
  3. Replies: 1
    Last Post: 06-07-2006, 08:55 AM
  4. Create new excel files, Save backup of excel file
    By Gil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2006, 04:45 PM
  5. [SOLVED] Backup:always create a backup file in the save options
    By Alek in forum Excel General
    Replies: 1
    Last Post: 01-07-2006, 09:25 PM

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