My office computer is down, so I can't offer much help.
You will need to write a sub for each Workbook Event each of which triggers a Timer or OnTime sub. I think the OnTime is easier
These are algorithms. They are NOT code. They WONT run. But...
If you can understand what they indicate doing, you should be able to write some code that works
Sub AllWorkbookEvents( As needed)
TimerOrOnTime Now
End Sub
SubTimerOrOnTime(StartTime As Long)
Const MaxIdleTimeAllowed As Long = Max Time As DateSerial 'Here for easy modification of idle time.
'One DateSerial minute = 1/(24*60)
Static EndTime As Long
Static Running As Boolean 'Only set true after running once.
If Running Then 'If not Running, there is no OnTimer to reset
Turn off OnTimer (EndTime) 'must use the same time value as when initiated
End If
Running =True
EndTime = StartTime + MaxIdleTime
Create new OnTimer (EndTime)
The thing I've called OnTimer is what saves and closes the book