Hello Everyone,
I have a Macro that is set perfect that when the timer reaches five(5) minutes the User receives a popup message "Are you still working with this File? Yes/No
If the User interacts with the Workbook all is good and the User moves forward with the work or task at hand.
Here is the question... Can the code be modified so if the user DOES NOT interact with the popup message box by selecting Yes or No that the code will recognize no activity with the Popup and the file is closed.
Sub TimeSettingCoach()
CloseTime = Now + TimeValue("00:10:00")
On Error Resume Next
Application.OnTime EarliestTime:=CloseTime, _
Procedure:="Msgbox_BeforeRunningCoach", Schedule:=True
End Sub
Sub Msgbox_BeforeRunningCoach()
Dim answer As Integer
If CloseMode = 0 Then
Cancel = True
If Not MsgBox("Are you still working with this File?", vbYesNo + vbInformation, "Close Request") = vbYes Then
Call MacroCoach3
Else
Call TimeSetting2Coach
End If
End If
End Sub
Your thoughts appreciated!
Regards,
John
Bookmarks