Here is a Excel VBA code that will allow you to backup your active worksheet as per your defined time. It is by default “15 seconds” but you can change the period as per your needs.


Create a folder and name it “Test” in the partition C:\

The code in a module

Sub CreateBackup()
'The code creates backup of the workbook every 15 seconds. You can change the period
    Dim strDate As String, strTime As String
'Format date
    strDate = Format(Date, "DD-MM-YYYY")
'Format time
    strTime = Format(Time, "")
'Cancel alert messages
    Application.DisplayAlerts = False
        With ActiveWorkbook
'Create a backup in the C:\Test folder. You can change the path
            .SaveCopyAs Filename:="C:\Test\" & strDate & "_" & strTime & "_" & .Name
        End With
    Application.DisplayAlerts = True
'Run the macro again after 15 seconds
    Application.OnTime Now + TimeValue("00:00:15"), "CreateBackup"
End Sub

And this code is in a workbook module

Private Sub Workbook_Open()
'Run the macro named "CreateBackup" after 15 seconds when workbook is opened
    Application.OnTime Now + TimeValue("00:00:15"), "CreateBackup"
End Sub