Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to display a message box when the user 'exits' the application.
Sub Auto_close () MsgBox "THANK YOU FOR YOUR FEEDBACK ", vbOKOnly + vbInformation, "From the Agreement Finance Team" Application.Quit End Sub The problem is that the message box appears twice, each time prompting the user to click ok. Any ideas why or how I can stop this. Thanks Mark ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark
Get rid of "Application.Quit" in the code and see if it helps. Aplication does not refer to your app but to Excel herself. Also, you should not use MsgBoxes for things like those, MsgBoxes require an OK click and if no click then Excel won't close and then Windows won't close and my laptop runs out of batteries or you won't be in time for dinner or ... You don't want your team's name on a monster like that. -- HTH. Best wishes Harald Followup to newsgroup only please. "patterson_m" wrote in message ... I want to display a message box when the user 'exits' the application. Sub Auto_close () MsgBox "THANK YOU FOR YOUR FEEDBACK ", vbOKOnly + vbInformation, "From the Agreement Finance Team" Application.Quit End Sub The problem is that the message box appears twice, each time prompting the user to click ok. Any ideas why or how I can stop this. Thanks Mark ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run macro on exit | Excel Discussion (Misc queries) | |||
Exit Sub | Excel Discussion (Misc queries) | |||
Run when exit | Excel Worksheet Functions | |||
Excel 2003 - the "X" to exit the application option is greyed out. | Excel Discussion (Misc queries) | |||
Close or Exit application | Excel Programming |