Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 94
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I auto create a backup for each Word doc. How can I in Excel? Dollins13 Excel Discussion (Misc queries) 7 July 13th 09 05:33 PM
Set Excel 2000 to automatically create backup file. Steve Zed Excel Discussion (Misc queries) 3 March 7th 07 05:09 PM
In Excel, I want to create a backup copy whenever I save a file. Bearpecs Excel Discussion (Misc queries) 1 June 7th 06 01:52 PM
create a separate backup file in excel when exiting backup excel files Excel Worksheet Functions 1 February 2nd 06 08:21 PM
How do I Create backup of excel file in other folder khalid Excel Discussion (Misc queries) 1 May 24th 05 11:01 AM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"