Record a Macro. The Wizard will have a space to select Hotkeys. It doesn't matter what you Record, (just select a cell and type something.)
Edit that Macro by replace any code in it with
You might want to save and close the book at other times and Events. You can Use a "Universal" Save and Close Sub and call it from that Macro.
Macro Code
Sub MacroName
'Some Macro comments
SaveAndClose
End Sub
Put the following in the same Code Module that the Macro gets saved in
Public Sub SaveAndClose()
Me.Save
Me.Close
End Sub
Public Sub CloseOnTime()
Static CloseTime As Date
'Cancel the previous close on time
If Not CloseTime = 0 Then _
Application.OnTime CloseTime, SaveAndClose, , False
CloseTime = DateAdd("s", 300, Now) 'The Workbook will close in 300 seconds
Application.OnTime CloseTime, SaveAndClose, , True
End Sub
Put the following Subs in the ThisWorkbook Module
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Save
End Sub
Private Sub Workbook_Open()
CloseOnTime
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
CloseOnTime
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
CloseOnTime
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
CloseOnTime
End Sub