How do i save backup copy in a different folder
When i am saving a file by selecting "Always create backup", backup file is
saved in the same folder, how do i save this backup file in a different folder. - Microsoft Excel 2000 |
Try using the SaveAsCopy method instead.
-- HTH RP (remove nothere from the email address if mailing direct) "mekraj" wrote in message ... When i am saving a file by selecting "Always create backup", backup file is saved in the same folder, how do i save this backup file in a different folder. - Microsoft Excel 2000 |
Here is one I use to backup to the current directory\backup
Sub Backup() 'kept in personal.xls & assigned to toolbar button On Error GoTo BackupFile MkDir CurDir & "\Backup" BackupFile: With ActiveWorkbook MyWB = .Path & "\BACKUP\" & .Name .SaveCopyAs MyWB .Save End With End Sub -- Don Guillett SalesAid Software "mekraj" wrote in message ... When i am saving a file by selecting "Always create backup", backup file is saved in the same folder, how do i save this backup file in a different folder. - Microsoft Excel 2000 |
RP
This would require VBA code as Bob points out with the savecopyas method. Sub BUandSave() 'Saves the current file to a backup folder and the default folder 'Note that any backup is overwritten Application.DisplayAlerts = False ActiveWorkbook.SaveCopyAs FileName:="E:\GordStuff\Backup\" & _ ActiveWorkbook.Name ActiveWorkbook.Save Application.DisplayAlerts = True End Sub You could use a BeforeSave Sub in Thisworkbook module. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) BUandSave End Sub Gord Dibben Excel MVP On Fri, 17 Dec 2004 11:11:30 -0000, "Bob Phillips" wrote: Try using the SaveAsCopy method instead. -- HTH RP (remove nothere from the email address if mailing direct) "mekraj" wrote in message ... When i am saving a file by selecting "Always create backup", backup file is saved in the same folder, how do i save this backup file in a different folder. - Microsoft Excel 2000 |
All times are GMT +1. The time now is 01:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com