Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bernadette
 
Posts: n/a
Default Can I insert a pop up window in Excel to ask a ? b/4 closing?

I would like to create a pop up box simular to the one that appears when you
are closing your document and are asked to save. Is there a function to
allow you to create your own pop up window and questions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Can I insert a pop up window in Excel to ask a ? b/4 closing?

Create an event handler for Before_Close event in workbook's code.
Show an user-defined Userform

HTH
--
AP

"Bernadette" a écrit dans le message
de news: ...
I would like to create a pop up box simular to the one that appears when
you
are closing your document and are asked to save. Is there a function to
allow you to create your own pop up window and questions?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas, Excel MVP
 
Posts: n/a
Default Can I insert a pop up window in Excel to ask a ? b/4 closing?

This is done by using VBA.
Try: Alt/F11, then Insert/Module, then enter this:
Sub Test()
answer=msgbox("Do you want to go to sleep now?",vbyesno)
if answer =vbyes then msgbox "Good night" else msgbox "Good day!"
End Sub

then Alt/F11 again, then in Excel use Alt/F8, double-click Test & you'll see
this example.

"Bernadette" wrote:

I would like to create a pop up box simular to the one that appears when you
are closing your document and are asked to save. Is there a function to
allow you to create your own pop up window and questions?

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Gray Bar Taking up Half of Excel Window tgavin Excel Discussion (Misc queries) 1 July 17th 06 11:14 PM
when i insert word art in excel sheet excel file closes automatica marwin Excel Discussion (Misc queries) 1 April 10th 06 03:29 PM
How do I undo the Excel, Window Menu, New Window command OLDFANG Excel Discussion (Misc queries) 2 March 17th 06 05:31 PM
Can I edit headings in Excel Watch Window? gakiii Excel Worksheet Functions 0 March 9th 06 07:15 AM


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