Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop up message box on close in Excel

Status
Not open for further replies.

MattGreer

Technical User
Feb 19, 2004
471
US
Using Excel 2013. I need to have a message box pop up when a user (namely, me) closes the particular Excel spreadsheet. I just need a message box to pop up with a message and an OK button, regardless of whether or not I've saved the spreadsheet prior to closing it.

I tried using John Walkenbach's code utilizing the Beforeclose event but it didn't work for me. Not sure how to use it correctly, I suppose.

Thanks!!


Matt
 
You can find some information about Handling The Workbook Beforeclose Event here

I guess the trick is that "This procedure must be in the code module for the ThisWorkbook object."

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Please post the entire procedure for the Workbook_Beforeclose Event here.


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top