+ Reply to Thread
Results 1 to 6 of 6

Save last 5 to 10 file (same file) automatically for back-up excel

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    24

    Save last 5 to 10 file (same file) automatically for back-up excel

    some times i messed up with my excel file and realize it later

    I want to keep save last 10 file or any number of file to be saved automatically.

    I am not talking about recent or last 10 DIFFERENT FILES i have worked on

    I am talking about one specific file which, when ever i save it, it should save like SAVE AS or some thing like that but only last few files


    BTW save as meaning that i am creating large no of files unless i delete them manually and i dont want to do that

    I have already checked for always keep back up, which is saving last one file only, I want to make same function but it should keep 10 file at least

    Thanks

  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: Save last 5 to 10 file (same file) automatically for back-up excel

    Put this into the ThisWorkbook module of your workbook, the workbook will have to be saved as a .xlsm file.
    Please Login or Register  to view this content.
    This will make 10 backups. If you only want 5, change the 9 to a 4.
    _________________
    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 Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Save last 5 to 10 file (same file) automatically for back-up excel

    Better yet, use this version.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-05-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Save last 5 to 10 file (same file) automatically for back-up excel

    None of these worked for me

    I know i am making some mistake in applying your trick as i am noob in it

    here is what i did

    i click on developer tool then Visual basic>right click on "This Workbook" insert > Module> and then paste your (both ) codes and save as .xlsm file.

    Note:- Macro is already enabled and saved as .xlsm file
    Last edited by nicholes; 10-07-2016 at 08:27 AM.

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

    Re: Save last 5 to 10 file (same file) automatically for back-up excel

    The code provided goes into the ThisWorkbook module, not Module1.

  6. #6
    Registered User
    Join Date
    04-05-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Save last 5 to 10 file (same file) automatically for back-up excel

    Quote Originally Posted by JBeaucaire View Post
    The code provided goes into the ThisWorkbook module, not Module1.
    That worked!!!

    Thanks man

    Reputation added

    Cheers!!!

+ 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. Looking to automatically save file as new file name after a query is run
    By karlzweb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2014, 09:21 PM
  2. Replies: 1
    Last Post: 10-25-2013, 12:49 AM
  3. Replies: 1
    Last Post: 10-01-2012, 11:46 PM
  4. Back Up File on Save
    By thompsy121 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2009, 06:44 AM
  5. Automatically Save an excel file at a certain time
    By RobbieBobbie23 in forum Excel General
    Replies: 2
    Last Post: 06-26-2007, 02:16 PM
  6. [SOLVED] Save excel as web page and have htm file update automatically
    By Kryer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2006, 07:05 PM
  7. Replies: 7
    Last Post: 07-25-2005, 05:05 PM
  8. Replies: 3
    Last Post: 02-09-2005, 08:06 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