ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i save backup copy in a different folder (https://www.excelbanter.com/excel-discussion-misc-queries/2100-how-do-i-save-backup-copy-different-folder.html)

mekraj

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

Bob Phillips

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




Don Guillett

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




Gord Dibben

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