---
> From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
>
> On Behalf Of Prakash Gusain
> Sent: 26 December 2011 11:20
> To: MS EXCEL AND VBA MACROS
> Subject: $$Excel-Macros$$ Backup file on every save
>
> Hi
>
> I am trying to find the code to
alue, intI, 1))) -
64
End If
Next
End Function
-Original Message-
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Prakash Gusain
Sent: 26 December 2011 11:20
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ Backup file on every save
try this code and check if it helps
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
' ---save the backup---
Me.SaveAs Filename:="F:\MyData\" & Me.Name
'---save the main file---
Me.SaveAs Filename:="D:\MyDocument\" & Me.Name
Application.DisplayAlerts = True
End
Hi
I am trying to find the code to create a backup of file on every
occasion user saves the file. But I want to specify the location
where the backup file will be created.
I know the feature to create the backup of file but want to specify
the location where it saves the backup.
Thanks in advan