LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default MsgBox; if 10-seconds, assumed 'No' Clicked

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!

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wait msgbox for 3 seconds only Eddy Stan Excel Programming 2 November 26th 08 06:58 PM
Excel msgbox when cell range is clicked SoggyCashew Excel Discussion (Misc queries) 2 November 6th 08 10:25 PM
Display MsgBox wait for 10 seconds then click on yes automatically Vikram Dhemare Excel Programming 7 October 29th 06 11:57 AM
Displaying A MsgBox for X Seconds Mark Excel Programming 1 July 15th 05 02:41 PM
Assumed Lunch Jeff Excel Discussion (Misc queries) 2 March 20th 05 05:35 AM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"