when i save my budget report workbook, can i also save my
backup copy held in a diffrrent drive.
thanks
mark
when i save my budget report workbook, can i also save my
backup copy held in a diffrrent drive.
thanks
mark
Mark, here is one way, from a post by Gord Didden
You could create a macro that will save the file at the default location and
a
copy to the folder of your choice.
The macro could be run manually or in beforesave code in ThisWorkbook.
Sub BUandSave2()
'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
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs FileName:="E:\BackupĀ*\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub
if you are new to macros you may also what to have a look here on getting
started with macros
http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
Gord Dibben Excel MVP
"Mark" <[email protected]> wrote in message
news:[email protected]...
> when i save my budget report workbook, can i also save my
> backup copy held in a diffrrent drive.
>
> thanks
>
> mark
Here is one I use to backup to the same folder in a sub folder. Modify to
suit.
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
[email protected]
"Mark" <[email protected]> wrote in message
news:[email protected]...
> when i save my budget report workbook, can i also save my
> backup copy held in a diffrrent drive.
>
> thanks
>
> mark
Thanks
for this it works great one thing through if i wanted to=20
run this type of macro when i x out of excell what would=20
the top line read.
thanks
mark
>-----Original Message-----
>Mark, here is one way, from a post by Gord Didden
>
>You could create a macro that will save the file at the=20
default location and=20
>a
>copy to the folder of your choice.
>
>The macro could be run manually or in beforesave code in=20
ThisWorkbook.
>
>
>
>Sub BUandSave2()
>'Private Sub Workbook_BeforeSave(ByVal SaveAsUI As=20
Boolean, Cancel As=20
>Boolean)
>'Saves the current file to a backup folder and the=20
default folder
>'Note that any backup is overwritten
> Application.DisplayAlerts =3D False
> ActiveWorkbook.SaveCopyAs FileName:=3D"E:\Backup=AD\" & _
> ActiveWorkbook.Name
> ActiveWorkbook.Save
> Application.DisplayAlerts =3D True
>End Sub
>
>
>
>if you are new to macros you may also what to have a=20
look here on getting=20
>started with macros
>
>http://www.mvps.org/dmcritchie/excel/getstarted.htm
>
>
>
>
>--=20
>Paul B
>Always backup your data before trying something new
>Please post any response to the newsgroups so others can=20
benefit from it
>Feedback on answers is always appreciated!
>Using Excel 2002 & 2003
>
>
>
>
>
>
>
>Gord Dibben Excel MVP
>
>
>"Mark" <[email protected]> wrote in=20
message=20
>news:[email protected]...
>> when i save my budget report workbook, can i also save=20
my
>> backup copy held in a diffrrent drive.
>>
>> thanks
>>
>> mark=20
>
>
>.
>
thanks for this.
mark
>-----Original Message-----
>Mark, here is one way, from a post by Gord Didden
>
>You could create a macro that will save the file at the=20
default location and=20
>a
>copy to the folder of your choice.
>
>The macro could be run manually or in beforesave code in=20
ThisWorkbook.
>
>
>
>Sub BUandSave2()
>'Private Sub Workbook_BeforeSave(ByVal SaveAsUI As=20
Boolean, Cancel As=20
>Boolean)
>'Saves the current file to a backup folder and the=20
default folder
>'Note that any backup is overwritten
> Application.DisplayAlerts =3D False
> ActiveWorkbook.SaveCopyAs FileName:=3D"E:\Backup=AD\" & _
> ActiveWorkbook.Name
> ActiveWorkbook.Save
> Application.DisplayAlerts =3D True
>End Sub
>
>
>
>if you are new to macros you may also what to have a=20
look here on getting=20
>started with macros
>
>http://www.mvps.org/dmcritchie/excel/getstarted.htm
>
>
>
>
>--=20
>Paul B
>Always backup your data before trying something new
>Please post any response to the newsgroups so others can=20
benefit from it
>Feedback on answers is always appreciated!
>Using Excel 2002 & 2003
>
>
>
>
>
>
>
>Gord Dibben Excel MVP
>
>
>"Mark" <[email protected]> wrote in=20
message=20
>news:[email protected]...
>> when i save my budget report workbook, can i also save=20
my
>> backup copy held in a diffrrent drive.
>>
>> thanks
>>
>> mark=20
>
>
>.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks