R
ryguy7272
Sub ShutDown()
MsgBox "If there is no Activity in 5 seconds, Excel will save your work
and close. Do you need more time?", vbYesNo
On Error Resume Next
If vbYes Then
Call SetTime
Exit Sub
Else
DownTime = Now + TimeValue("00:00:05")
Application.OnTime DownTime, "ShutDown"
Call GonnaSave
End If
On Error GoTo 0
End Sub
I'm testing out some auto-close code. I'm wondering if the MsgBox actually
needs a user to click 'No' for the 'Else' part of the macro to fire. I think
so... How can I tell excel to go ahead and run the 'Else' if 'Yes' is NOT
clicked in 10-seconds?
As always, thanks!
MsgBox "If there is no Activity in 5 seconds, Excel will save your work
and close. Do you need more time?", vbYesNo
On Error Resume Next
If vbYes Then
Call SetTime
Exit Sub
Else
DownTime = Now + TimeValue("00:00:05")
Application.OnTime DownTime, "ShutDown"
Call GonnaSave
End If
On Error GoTo 0
End Sub
I'm testing out some auto-close code. I'm wondering if the MsgBox actually
needs a user to click 'No' for the 'Else' part of the macro to fire. I think
so... How can I tell excel to go ahead and run the 'Else' if 'Yes' is NOT
clicked in 10-seconds?
As always, thanks!