sethness15
New Member
- Joined
- Dec 11, 2013
- Messages
- 4
Hi All,
I think I'm going about this right but there's just something slightly wrong with my code.. I'm trying to have excel save a copy of my workbook to a specific directory when the active file is saved. Here's what I have..
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:="C:\Users\me\Desktop\Copy.xls", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub
It's saving the file but excel stops working afterwards.
Please let me know if you have any suggestions.
Thanks!
I think I'm going about this right but there's just something slightly wrong with my code.. I'm trying to have excel save a copy of my workbook to a specific directory when the active file is saved. Here's what I have..
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:="C:\Users\me\Desktop\Copy.xls", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub
It's saving the file but excel stops working afterwards.
Please let me know if you have any suggestions.
Thanks!