Ago
06-21-2008, 09:13 AM
im trying to make excel save my workbook in two harddrives.
i cant get it to run correct.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs FileName:="C:\copy\" & ThisWorkbook.Name
End Sub
First of all, i dont want it to be SaveAs since i get a question if i want to replace the current file.
second problem, it crashes. thats a rather big problem.
it starts saving and then it says execl crashed bla bla bla, recreate the workbook and restart excel or something.
how do i fix this?
i cant get it to run correct.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs FileName:="C:\copy\" & ThisWorkbook.Name
End Sub
First of all, i dont want it to be SaveAs since i get a question if i want to replace the current file.
second problem, it crashes. thats a rather big problem.
it starts saving and then it says execl crashed bla bla bla, recreate the workbook and restart excel or something.
how do i fix this?