Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
chanwando
 
Posts: n/a
Default Pop up message at closing


I need to somehow get excel to "popup" a confirmation window when the
user attempts to close out. The message would be something along the
lines of "Is this the correct product?". If yes, excel would exit, if
not, then no.

I would really appreciate anyone who has the time/patience to assist me
with this.

Thank you!

Chandra


--
chanwando
------------------------------------------------------------------------
chanwando's Profile: http://www.excelforum.com/member.php...o&userid=27123
View this thread: http://www.excelforum.com/showthread...hreadid=466362

  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

Chandra,

Put the following code in the ThisWorkbook code module:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Is this correct?", vbYesNo) = vbNo Then
Cancel = True
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"chanwando"
wrote in
message
...

I need to somehow get excel to "popup" a confirmation window
when the
user attempts to close out. The message would be something
along the
lines of "Is this the correct product?". If yes, excel would
exit, if
not, then no.

I would really appreciate anyone who has the time/patience to
assist me
with this.

Thank you!

Chandra


--
chanwando
------------------------------------------------------------------------
chanwando's Profile:
http://www.excelforum.com/member.php...o&userid=27123
View this thread:
http://www.excelforum.com/showthread...hreadid=466362



  #3   Report Post  
chanwando
 
Posts: n/a
Default


Thanks Chip! I really appreciate the help on this one!

Have a GREAT day!

Chandra


--
chanwando
------------------------------------------------------------------------
chanwando's Profile: http://www.excelforum.com/member.php...o&userid=27123
View this thread: http://www.excelforum.com/showthread...hreadid=466362

Reply
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
Check box and and formula Russell-stanely Excel Discussion (Misc queries) 7 July 7th 05 09:06 PM
Excel Error Message Mark Excel Worksheet Functions 3 June 1st 05 02:41 PM
Calculations And Order In Macros Carl Bowman Excel Discussion (Misc queries) 4 February 23rd 05 10:53 PM
when opening excel I receive a message that says file can't be fo. Ken Excel Discussion (Misc queries) 3 February 22nd 05 12:13 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


All times are GMT +1. The time now is 05:16 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"