tintin1012000
Board Regular
- Joined
- Apr 27, 2011
- Messages
- 237
Hi all
Below Marco does almost everything I need but !!
Can anyone advsie if its possible to change it slightly so that the orignal file will remain open and that the auto saved file will save in the background
Eg, Im using it on a file called Planning.xlsm which is located on the server
but after the below macro runs the file displayed to the user is ''backups-2015-0529-1208.xlsm'' instead of remaining with the original on the server
Below Marco does almost everything I need but !!
Can anyone advsie if its possible to change it slightly so that the orignal file will remain open and that the auto saved file will save in the background
Eg, Im using it on a file called Planning.xlsm which is located on the server
but after the below macro runs the file displayed to the user is ''backups-2015-0529-1208.xlsm'' instead of remaining with the original on the server
HTML:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "MyMacro", , False
End Sub
Private Sub Workbook_Open()
dTime = Now + TimeValue("00:00:05")
Application.OnTime dTime, "MyMacro"
End Sub
Public dTime As Date
Sub MyMacro()
dTime = Now + TimeValue("00:15:00")
Application.OnTime dTime, "MyMacro"
ActiveWorkbook.SaveAs Filename:="c:\whatever" & Format(Now, "-yyyy-mmdd-hhmm") & ".xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
End Sub