+ Reply to Thread
Results 1 to 7 of 7

VBA automatically save backup copy in other folder

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Hannover, Germany
    MS-Off Ver
    Office 2010
    Posts
    9

    VBA automatically save backup copy in other folder

    Good day excel Gurus!

    I got a question, probably answer is somewhere at the forum, but I can't find it

    So, I ask for your help.

    I need a macro that will create a backup copy of excel file in other folder when an original file is closing.

    I will appreciate any help!

    Thank you in advance
    Last edited by kewlc2s; 06-21-2014 at 08:49 PM. Reason: SOLVED

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: VBA automatically save backup copy in other folder

    Hi, kewlc2s,

    maybe use the event
    Please Login or Register  to view this content.
    in ThisWorkbook/DieseArbeitsmappe and SaveCopyAs for saving a copy of the file with a date and time stamp in the given folder.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    06-20-2014
    Location
    Hannover, Germany
    MS-Off Ver
    Office 2010
    Posts
    9

    Re: VBA automatically save backup copy in other folder

    Danke HaHoBe

    But, maybe there is some other way to solve this problem.
    File is used by many users, a lot of them are not familiar with excel, and I afraid that they will delete or change something.
    That's why I want to make emergency copy (in other folder), every time when file is closing. Would be really good if name could be dd mm yyyy mm hh

  4. #4
    Registered User
    Join Date
    06-20-2014
    Location
    Hannover, Germany
    MS-Off Ver
    Office 2010
    Posts
    9

    Re: VBA automatically save backup copy in other folder

    I found a macro for saving Copy, but another question, how I can change directory for saving file?

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: VBA automatically save backup copy in other folder

    Hi kewlc2s,

    See if this code helps. I commented it a lot for you to understand. I hope it all makes sense.

    This is the code for the actual saving:

    Please Login or Register  to view this content.

    This is the code to make sure the folder you are saving to always exists

    Please Login or Register  to view this content.
    Thanks

  6. #6
    Registered User
    Join Date
    06-20-2014
    Location
    Hannover, Germany
    MS-Off Ver
    Office 2010
    Posts
    9

    Re: VBA automatically save backup copy in other folder

    Thank you fredlo2010 !!!
    Now I understood, thanx a lot !!!

  7. #7
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: VBA automatically save backup copy in other folder

    I am glad I was able to help

+ 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. Save Backup copy on Workbook Exit
    By Foreverlearning in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2012, 06:38 PM
  3. Replies: 1
    Last Post: 06-07-2006, 08:55 AM
  4. [SOLVED] save a backup copy in different folder
    By GT in forum Excel General
    Replies: 3
    Last Post: 05-11-2006, 02:40 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

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