The following is not closing after five seconds of no action by the user. Can anyone suggest a reason.
Code was tested in another WB and the same symptoms (or lack of) occurred.
It used to work but progressively deteriorated. How do I rule in/out WScript?
Other suggestions?
Code:
Sub inactivityShellPopUp()
Const ShowDurationSecs As Integer = 5
response = 7
response = CreateObject("WScript.Shell").PopUp( _
"This program will close in " & _
ShowDurationSecs & " seconds." & vbCrLf & _
"Do you want it to close now?", ShowDurationSecs, _
"Message Title", 4 + 32)
Select Case response
Case -1, 6
'MsgBox "do the close here..."
For Each w In Application.Workbooks
w.Save
'w.Close
Next w
Application.Quit
Case Else
End Select
End Sub
Code was tested in another WB and the same symptoms (or lack of) occurred.
It used to work but progressively deteriorated. How do I rule in/out WScript?
Other suggestions?