Hello i have and autosave macro that autosave an xls file whit data time stamp..my problem is that the macro runs only in one day..and each time i must restart Workbook to reset the Timer..i dont know that to do...maybe to change the Event..(i want this macro to autosave each day..but works only 1 day:* please Help if you want to help me my e-mail is e-mail address removed thx a lot
Module1
Code:
Private Sub Workbook_Open()
StartTimer
End Sub
Code:
Option Explicit
Public RunTime
Sub StartTimer()
Application.OnTime TimeValue("23:55:00"), "Backup"
Application.OnTime TimeValue("15:25:00"), "Backup"
End Sub
Sub Backup()
Dim sPath As String
Dim sFullPath As String
sPath = "Z:\Contorizare"
sFullPath = sPath & "\Data " & Format(Now, "dd_mm_yyyy Ora hh mm") & ".xls"
ThisWorkbook.SaveCopyAs sFullPath
End Sub
Last edited by a moderator: