how to save the same file in other location

  • Thread starter Thread starter ravscares
  • Start date Start date
R

ravscares

Hi,

I have a file named abc.xls and the same is copied at other location
(different path). When ever I update the abc.xls file, I want the same file
in other path also to be updated. Is it possible?

Regards,
Ravi.D
 
Click on File | Save As and then navigate to that other location and
click Save - you might be warned that the file exists, but just click
OK.

Hope this helps.

Pete
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As _
Boolean, Cancel As Boolean)
'Saves the current file to a backup folder and the default folder
'Note that any backup is overwritten without warning
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:="C:\Gordstuff\" & _
ActiveWorkbook.Name 'saves a copy of the workbook
ActiveWorkbook.Save 'saves the workbook
Application.DisplayAlerts = True
End Sub

Right-click on the Excel Icon left of "File" abd select "Videw Code"

Copy/paste the code above into that module.

Edit the path to suit.

Alt + q to return to the Excel window.

Save the workbook.


Gord Dibben MS Excel MVP
 
Back
Top