Welcome to the forum.
In the ThisWorkbook module:
Option Explicit
Private Sub Workbook_Open()
Dim iPos As Long
Dim sRev As String
On Error Resume Next
dtInt = Replace(ThisWorkbook.Names("SaveInterval").Value, "=", "") / 1440
If Err <> 0 Then Exit Sub
On Error GoTo 0
' find the v and number following
sName = Me.FullName
iPos = InStrRev(sName, "v", , vbTextCompare)
sRev = Mid(sName, iPos + 1, InStr(1, sName, ".") - 1)
sExt = Mid(sName, InStrRev(sName, "."))
sRev = Replace(sRev, sExt, "")
If Not IsNumeric(sRev) Then Exit Sub
' get current revision & shorten name
iRev = sRev
sName = Left(sName, iPos)
' schedule macro
dtSave = Now() + dtInt
Application.OnTime dtSave, "AutoSave"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dtSave, "AutoSave", , False
End Sub
In a code module:
Option Explicit
Public dtSave As Date ' next scheduled save
Public dtInt As Date ' save interval
Public iRev As Long ' current revision
Public sName As String ' file name through the "v"
Public sExt As String ' file extension (e.g., ".xls", ".xlsm")
Sub AutoSave()
iRev = iRev + 1
ThisWorkbook.SaveAs Filename:=sName & CStr(iRev) & sExt, _
AddToMRU:=True
dtSave = dtSave + dtInt
Application.OnTime dtSave, "AutoSave"
End Sub
You need to create a named constant SaveInterval, e.g.,
Insert > Name > Define SaveInterval Refers to =30
The workbook name must be like "*v#.*, i.e., a root name, the letter v, a number (any number of digits), and an extension.
Bookmarks