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: 134
Default auto close while MsgBox is open

My code includes the following.

Dim Message, Title, Response
Message = "Entry must be numeric."
Title = "Invalid Entry"
Response = MsgBox(Message, Style, Title, Help, Ctxt)

and, in a separate module,

Sub Auto_Open()
' bunch of code
Application.OnTime Now + TimeValue("00:00:30"), "Close_Workbook"
' more code
End Sub
Sub Close_Workbook()
Application.DisplayAlerts = False
ThisWorkbook.Close
End Sub

I want to guard against someone walking away without responding with an "OK" to the message.
Is there a way I can get the workbook to automatically close while the MsgBox is still open?

Thanks in advance.


Kevin
 
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
code to close an excel sheet without saving it .(via msgbox) Satyam Reddy Excel Worksheet Functions 2 May 14th 08 02:48 PM
Clear Auto Filter on Close (or open) Karin Excel Discussion (Misc queries) 3 August 23rd 07 06:16 PM
Auto filter using msgbox in macro not woking ashish128 Excel Discussion (Misc queries) 4 June 9th 07 06:08 AM
Auto Open, Refresh, Save, Close Jimmycooker Excel Discussion (Misc queries) 0 February 6th 06 01:34 PM
Novice - MsgBox Yes/No - Continue if Yes, Close if No Beetlejuice Excel Discussion (Misc queries) 6 August 29th 05 09:48 PM


All times are GMT +1. The time now is 11:32 PM.

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"