Save as backup in diff location

  • Thread starter Thread starter adam
  • Start date Start date
A

adam

Sorry another post guys!!

I have been using the Save as backup feature which is
brilliant I must save, however, when it saves it saves
into the same location as the original file.

Is there anyway I can have it save to another location I
specify?

Thanks

Adam
 
Adam,

I use the macro below to save two dated / timed copies in different
folders, one on my local hard disk and another of the network, as well
as saving the original file. In each case, the folders already
exist - change the path and names to match what you need. Simply add
a button and assign the macro to it.

HTH,
Bernie
MS Excel MVP

Sub BUandSaveTemp()
'Saves the current file to two backup folders and its own folder
Application.DisplayAlerts = False

ActiveWorkbook.SaveCopyAs FileName:="C:\Excel Backup\" & _
Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) &
_
" BU " & Format(Now, " yyyy-mm-dd hh-mm") & ".xls"
ActiveWorkbook.SaveCopyAs FileName:="F:\Excel Backup\" & _
Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) &
_
" BU " & Format(Now, " yyyy-mm-dd hh-mm") & ".xls"
ActiveWorkbook.Save

Application.DisplayAlerts = True

End Sub
 
Back
Top