Hi one and all,
This time I have come up with a code that will Save a Copy of your current Excel file on a Specified Location (with Data & Time as Prefix) after an Specified Interval. You can always change the Folder Path and Interval Time.
This time I have come up with a code that will Save a Copy of your current Excel file on a Specified Location (with Data & Time as Prefix) after an Specified Interval. You can always change the Folder Path and Interval Time.
Remarks:-
As it involves macros, so make sure that you save the file in .xlsm ( Macro Enabled Format ) and also to enable macros after while Excel Workbook.
So here are the steps:-
1. Open the Workbook. Press Alt + F11 to open Visual Basic Window.
2. On the Left Side of the Screen, there would be a Thisworkbook Module. Double Click it.
3. Now Copy and Paste the code below there:-
Private Sub Workbook_Open()
Call Ontime
End Sub
4. Now Insert Module from the Insert Menu in the Menu Bar.
5. Copy and Paste the following codes there:-
Dim Hours, Minutes, Seconds
Sub Backup()
Fname = Format(Now, "mm-dd-yyyy_hh-mm") & "_" & ThisWorkbook.Name
FPath = ThisWorkbook.Path & "\" 'You can change the Folder Path Here..
ThisWorkbook.SaveCopyAs FPath & Fname
Call Ontime
End Sub
Sub Ontime()
Hours = 0 'Put Hours here
Minutes = 1 'Put Minutes here
Seconds = 0 'Put Seconds here
Application.Ontime Now + TimeSerial(Hours, Minutes, Seconds), "Backup"
End Sub
6. Close the Visual Basic Window and Save the file as Macro Enabled in .xlsm format. ( in .xls for 2003 version)
7. That's it. You can open that file and continue with your work.
8. Backup would be taken automatically after the specified intervals.
Remarks:-
You can always change the interval time by changing the values of Bold variables (Current delay is 1 Minute ). Make sure FPath must end with a "\" sign.
Regards,
You can safely backup your Excel workbooks on open or on demand automatically using Dose for Excel Add-In:
ReplyDeletehttps://www.zbrainsoft.com/Backup-Settings.html
kırşehir
ReplyDeletegümüşhane
yozgat
kırıkkale
kocaeli
8P4