+ Reply to Thread
Results 1 to 12 of 12

Automatically creating a back copy in other location which is updated at all times

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Unhappy Automatically creating a back copy in other location which is updated at all times

    Hi ,
    I am using this code to make an automatic copy of work book in other destinations.
    I am learning on how to write the code.
    My file name is ABCDE and it is at C:/TP/NN ( NN is the folder)
    Path where back up copy is to be saved is C:/TP/BK( BK is the name of the folder)
    I want the data on back copy saved every time the main copy is modified, however if some one tries to delete any information, then the back up copy remains as it is.
    How it can be possible???
    I have a general code, but dont know how to rewrite it.
    Please help...


    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 03-09-2013 at 10:42 AM. Reason: Added code tags, as per forum rules. Don't forget!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically creating a back copy in other location which is updated at all times

    In the ThisWorkbook module, create a macro that makes a backup copy of the file everytime the file is opened. I can't imagine any better backup method since you will have difficulty knowing any other time whether the macro was edited.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Hi Sir,
    Thanks for the code above.
    This one does not work as intended. Do you propose another solution please.

    Kind regards

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically creating a back copy in other location which is updated at all times

    No, the SaveCopyAs method is the one to use when needing a backup copy of a file before any changes have occurred.

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Hi Sir,
    This book is used by many and they will keep using it , updating it from time to time.
    I was aiming at creating a copy of the same at other location, before it is modified automatically.
    The above solution seems good, however I did copy the code and pasted it in the first sheet, exactly the way you have helped me, however it does not create a copy.
    The intending folder
    Please Login or Register  to view this content.
    remains empty. I am not sure where am I going wrong.
    Please help

    Kind regards

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically creating a back copy in other location which is updated at all times

    Follow the instructions in post #2 as to where the macro must reside.

  7. #7
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Hi Sir,
    Thanks.
    I am determined to learn. Thanks for leading me, however still struggling.... Need more help please.
    Bit confused ? . I have typed the code as follows

    Please Login or Register  to view this content.
    It does not work. I am still making a mistake. Sorry Sir. Help please
    Kind regards

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically creating a back copy in other location which is updated at all times

    Which code module did you put it in? I tested the macro as given moments ago and it's working fine. I'm guessing you still don't have it in the correct module. Read post #2 again.

  9. #9
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Hi Sir,
    It worked perfectly. I did make out where I was doing a mistake.
    Could not reply earlier as I was medically down for a while.
    Thanks
    Kind regards

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically creating a back copy in other location which is updated at all times

    Glad to help. Hope you're feeling better.

  11. #11
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Thanks JB Sir,
    Feeling much better and back to work now.
    Thanks again
    Regards

  12. #12
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Automatically creating a back copy in other location which is updated at all times

    Hi JB Sir,
    Need further help from you.
    Kind regards

+ 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