Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gita
 
Posts: n/a
Default 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   Report Post  
FSt1
 
Posts: n/a
Default

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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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
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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
copy and paste excel spreadsheet into autocad rickr Excel Discussion (Misc queries) 0 July 15th 05 04:41 PM
Can't Copy and Paste between Excel 2003 Workbooks wllee Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
Copying Excel object back into Excel from Word Regina Excel Discussion (Misc queries) 2 March 29th 05 06:57 PM
Excel 2003 back to Excel 2002 Pete Carr Excel Discussion (Misc queries) 3 December 27th 04 08:11 AM


All times are GMT +1. The time now is 12:21 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"