Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How can we back up a permanant copy of an excel file automaticaly
How can we back up an excel file in our hard disk without using SAVE AS
command in our hard disk each time we close the file. I want to have a update copy of the excel file on my hard disk without others know that this file is being backuped up some where in the hard disk while closing it. THANK YOU |
#2
|
|||
|
|||
hi
end the workbook before close event.... Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.SaveAs Filename:="YourfullFilePathAndName", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub regards FSt1 "Gita" wrote: How can we back up an excel file in our hard disk without using SAVE AS command in our hard disk each time we close the file. I want to have a update copy of the excel file on my hard disk without others know that this file is being backuped up some where in the hard disk while closing it. THANK YOU |
#3
|
|||
|
|||
I would have used the workbook_beforesave event.
Option Explicit Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) On Error Resume Next MkDir "C:\mybackups" Me.SaveCopyAs Filename:="c:\mybackups\mynamehere.xls" On Error GoTo 0 End Sub This code goes under the ThisWorkbook module. And it overwrites the previous backup (if it exists) each time you save your file. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Gita wrote: How can we back up an excel file in our hard disk without using SAVE AS command in our hard disk each time we close the file. I want to have a update copy of the excel file on my hard disk without others know that this file is being backuped up some where in the hard disk while closing it. THANK YOU -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
copy and paste excel spreadsheet into autocad | Excel Discussion (Misc queries) | |||
Can't Copy and Paste between Excel 2003 Workbooks | Excel Discussion (Misc queries) | |||
Copying Excel object back into Excel from Word | Excel Discussion (Misc queries) | |||
Excel 2003 back to Excel 2002 | Excel Discussion (Misc queries) |