LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Message Box on exiting workbook

Hi,

maybe this

Private Sub Workbook_BeforeClose(Cancel As Boolean)
response = MsgBox("Are you sure you want to quit?", vbYesNo)
If response = vbNo Then
Cancel = True
End If
End Sub

Mike

"cufc1210" wrote:

I have a spreadsheet where i have a macro that saves and exits the workbook.

when the save & Exit button is pressed is it possible to have a message box
pop up and ask if they are sure they want to exit the workbook. Then when
they select ok it will continue to save and exit.

I hope this makes sense

 
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
exiting excel ONLY the workbook will close Brandon Excel Discussion (Misc queries) 12 May 27th 10 09:59 PM
Pop-up Message for each worksheet in a workbook patsy Excel Discussion (Misc queries) 4 January 14th 09 06:16 PM
Re-establish function on exiting workbook Colin Hayes Excel Worksheet Functions 4 January 5th 09 02:55 PM
how do i get a pop up message on saving or exiting a document? babyboos Excel Worksheet Functions 3 February 2nd 07 10:58 PM
Can I add a pop-up message that will show when a workbook opens Cruisin Lo Excel Discussion (Misc queries) 5 June 28th 06 07:17 PM


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