Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Auto Create an Excel Backup File on a Daily Basis
I have an Excel file called "ABC Ltd" that users update on a daily basis. Does anyone know know to auto create a backup at the end of a day? If today is October 2, 2009, the back up file name will be "Backup of ABC Ltd_20091002.xlk" And at end of next day, auto create another backup called "Backup of ABC Ltd_20091003.xlk" and so on the days to come. Thanks Igbert |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Auto Create an Excel Backup File on a Daily Basis
only easy way i can think of is using the windows scheduler, i have given
below two steps to achieve this... Step 1: create a file MyBackUp.vbs Open this file in Notepad and paste and save the below code 'Code Start '================================ 'kc - VBScript for creating backup file Dim FSO Dim strSource Dim strDest strSource="C:\\KC\\ABC Ltd.xls" ' change the above 'C:\\KC' to your actual file folder location strDest="C:\\KC\\Backup of ABC Ltd_" _ & year(Now()) & Lpad(month(Now())) & Lpad(day(Now())) &".xls" 'change the above 'C:\\KC' to your required destination location Set FSO = CreateObject("Scripting.FileSystemObject") FSO.CopyFile strSource, strDest Function Lpad (MyValue) Lpad=MyValue if Len(MyValue)=1 then Lpad="0" & MyValue End If End Function 'End of code '========================== Save the above file; lets say C:\KC\MyBackUp.vbs Step 2: (to call this file automatically daily @ 5:00 PM) *Go to Control panel *Open 'Scheduled Tasks' *Add Scheduled Tasks *Next *Browse *select the C:\KC\MyBackUp.vbs file *Daily *Start Time: 5:00 PM and perform this task 'Every Day' *provide your computer login username and password *Finish -Obviously the system should be running at 5:00PM All the best! -kc *Click YES if this helps "igbert" wrote: I have an Excel file called "ABC Ltd" that users update on a daily basis. Does anyone know know to auto create a backup at the end of a day? If today is October 2, 2009, the back up file name will be "Backup of ABC Ltd_20091002.xlk" And at end of next day, auto create another backup called "Backup of ABC Ltd_20091003.xlk" and so on the days to come. Thanks Igbert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I auto create a backup for each Word doc. How can I in Excel? | Excel Discussion (Misc queries) | |||
Set Excel 2000 to automatically create backup file. | Excel Discussion (Misc queries) | |||
In Excel, I want to create a backup copy whenever I save a file. | Excel Discussion (Misc queries) | |||
create a separate backup file in excel when exiting | Excel Worksheet Functions | |||
How do I Create backup of excel file in other folder | Excel Discussion (Misc queries) |