Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to get custom dialog box when exiting Excel Spreadsheet

Thanks Norman Jones. It worked great. This was my first time in this
discussion group, I am so excited about having another avenue for information.

Aardvark

"Norman Jones" wrote:

Hi Aardvaak,

Try:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Res As Long
Res = MsgBox("Have you...", vbYesNo)
Cancel = Res < 6

End Sub

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module:

Right click the Excel icon on the worksheet (or the icon to the left of the
File menu if your workbook is maximised) | Select View Code from the
resultant menu, and paste the code. Alt-F11 to return to Excel..


---
Regards,
Norman



"Aardvark" wrote in message
...
On Excel XP I would like for a message box to come up when exiting a
spreadsheet as a reminder to check certain items. Is this possible?




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
Custom Dialog Box Macro for Excel floyd,p Excel Discussion (Misc queries) 3 January 30th 09 11:15 PM
Excel Spreadsheet Not Saved Dialog Error KNETTEK Excel Discussion (Misc queries) 0 June 3rd 06 12:14 AM
custom views dialog box Wessel New Users to Excel 2 March 16th 06 05:03 PM
Excel custom function dialog [email protected] Excel Worksheet Functions 0 February 16th 06 01:08 AM
How can I make Excel display a message (dialog box) upon opening a spreadsheet? Phill Excel Discussion (Misc queries) 8 March 20th 05 06:22 PM


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