#1   Report Post  
Dave Peterson
 
Posts: n/a
Default

I save my files normally. Then I'll use windows explorer to copy them to my
backup folders (LAN drives, CD/DVD's, or whatever).

But if you wanted, you could have a workbook event that saves a copy to a
specified folder each time you save the workbook.

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

wrote:

How do I create a backup file to be stored at different directory? How to
specify the directory that I want the backup file to be stored?

Thanks,
Tom


--

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
How do I Create backup of excel file in other folder khalid Excel Discussion (Misc queries) 1 May 24th 05 11:01 AM
Backup in Saving a file in Excel 2002 4rs Excel Discussion (Misc queries) 1 January 14th 05 05:09 AM
How do you make a backup file - .bak or MS equivalent? Terry_BWL New Users to Excel 4 January 3rd 05 11:12 PM
How do I shut off making a backup copy of a file when I save in E. kboley2004 Excel Discussion (Misc queries) 2 December 21st 04 10:41 PM
Convert text file to MS_Excel Aqua Flow Excel Discussion (Misc queries) 1 November 30th 04 02:55 AM


All times are GMT +1. The time now is 10:18 PM.

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

About Us

"It's about Microsoft Excel"