Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ardus, Yesterday you answered the below question for me, but I need further
clarification. 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 this. What method or event will trigger this code to execute? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can declare an integer variable and in the OnClose event you can use the
message box function to ask your user for a response: dim intOnClose as Integer intOnClose = msgbox("Insert Question Here",vbYesNo,"Title Text for the Dialog box") if intOnClose = vbYes then do something here else do something here end if -- Kevin Backmann "Bernadette" wrote: Ardus, Yesterday you answered the below question for me, but I need further clarification. 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 this. What method or event will trigger this code to execute? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing " & ThisWorkbook.Name & " now" End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Bernadette" wrote in message ... Ardus, Yesterday you answered the below question for me, but I need further clarification. 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 this. What method or event will trigger this code to execute? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel novice question on filling in missing fields/cells | Excel Discussion (Misc queries) | |||
QUESTION: Copy pivottable from excel file to another. | Excel Discussion (Misc queries) | |||
MSQUERY...My Exact question (Excel 2000) | New Users to Excel | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Statistical Excel Function Question within Excel 2000... | Excel Worksheet Functions |