Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]Dim Scheduled_Time As Date
Private Sub Workbook_Open()
Schedule_Inactivity_Close
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.OnTime Scheduled_Time, "Inactivity_Close", , False
Schedule_Inactivity_Close
End Sub
Private Sub Schedule_Inactivity_Close()
Scheduled_Time = Now() + TimeValue("00:30")
Application.OnTime Scheduled_Time, "Inactivity_Close"
End Sub[/blue]
[blue]Sub Inactivity_Close()
MsgBox "Closing"
ThisWorkbook.Close True
End Sub[/blue]