Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
Is it possible to get the result of the Yes, No, Cancel Dialog that apers when i close an excel. It is asking if i would like to save the excel workbook. I need an event that apears if someone clicks No, or Cancel. Is there a way to get an event for these two actions? or something else i should do to know if somebody clicked no or cancel? my problem is, that i need to execute code after the workbookbeforeSave-Event. In the taskbar the Excel.exe process is not closing...if someone knows how i could solve that problem i would be very happy. then the first problem wouldn't be a problem anymore and i do not have to kill the Excel.exe process by myself... using c#, vs .net, vb.net is also understood thanks for your help m. ahrens |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
m,
Maybe this will help with the second problem... http://support.microsoft.com/?kbid=317109 "When you automate a Microsoft Office application from Microsoft Visual Basic .NET or Microsoft Visual C# .NET, the Office application does not quit when you call the Quit method" Regards, Jim Cone San Francisco, USA "m.ahrens" wrote in message ... Hi All Is it possible to get the result of the Yes, No, Cancel Dialog that apers when i close an excel. It is asking if i would like to save the excel workbook. I need an event that apears if someone clicks No, or Cancel. Is there a way to get an event for these two actions? or something else i should do to know if somebody clicked no or cancel? my problem is, that i need to execute code after the workbookbeforeSave-Event. In the taskbar the Excel.exe process is not closing...if someone knows how i could solve that problem i would be very happy. then the first problem wouldn't be a problem anymore and i do not have to kill the Excel.exe process by myself... using c#, vs .net, vb.net is also understood thanks for your help m. ahrens |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks for your help! that was very helpfull!! Excel closes correctly now!
But i have another problem... still need to get to know if the user clicked Yes,No,Cancel when he closes excel...what event do i have to use for that and how can i see what he has clicked on? thanks m.ahrens "Jim Cone" wrote: m, Maybe this will help with the second problem... http://support.microsoft.com/?kbid=317109 "When you automate a Microsoft Office application from Microsoft Visual Basic .NET or Microsoft Visual C# .NET, the Office application does not quit when you call the Quit method" Regards, Jim Cone San Francisco, USA "m.ahrens" wrote in message ... Hi All Is it possible to get the result of the Yes, No, Cancel Dialog that apers when i close an excel. It is asking if i would like to save the excel workbook. I need an event that apears if someone clicks No, or Cancel. Is there a way to get an event for these two actions? or something else i should do to know if somebody clicked no or cancel? my problem is, that i need to execute code after the workbookbeforeSave-Event. In the taskbar the Excel.exe process is not closing...if someone knows how i could solve that problem i would be very happy. then the first problem wouldn't be a problem anymore and i do not have to kill the Excel.exe process by myself... using c#, vs .net, vb.net is also understood thanks for your help m. ahrens |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
m.ahrens,
You are asking a blind man what it look like... In C#, do you have anything equivalent to "Typename". If so, it could possibly tell you whether Excel is still open... If TypeName(xlApp) = "Application" then Excel is still open (cancel was clicked). Also, you might be able to get the date last modified for the applicable file and compare it to the value saved before opening Excel to determine if Yes or No was clicked. There are probably better ways to do both. In Excel VBA, one can eliminate the offending message with... "Application.DisplayAlerts = False" or determine the "Saved" state of the workbook with... If ActiveWorkbook.Saved = True then (Yes was clicked). Regards, Jim Cone San Francisco, USA "m.ahrens" wrote in message ... thanks for your help! that was very helpfull!! Excel closes correctly now! But i have another problem... still need to get to know if the user clicked Yes,No,Cancel when he closes excel...what event do i have to use for that and how can i see what he has clicked on? thanks m.ahrens "Jim Cone" wrote: m, Maybe this will help with the second problem... http://support.microsoft.com/?kbid=317109 "When you automate a Microsoft Office application from Microsoft Visual Basic .NET or Microsoft Visual C# .NET, the Office application does not quit when you call the Quit method" Regards, Jim Cone San Francisco, USA "m.ahrens" wrote in message ... Hi All Is it possible to get the result of the Yes, No, Cancel Dialog that apers when i close an excel. It is asking if i would like to save the excel workbook. I need an event that apears if someone clicks No, or Cancel. Is there a way to get an event for these two actions? or something else i should do to know if somebody clicked no or cancel? my problem is, that i need to execute code after the workbookbeforeSave-Event. In the taskbar the Excel.exe process is not closing...if someone knows how i could solve that problem i would be very happy. then the first problem wouldn't be a problem anymore and i do not have to kill the Excel.exe process by myself... using c#, vs .net, vb.net is also understood thanks for your help m. ahrens |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
I can see th formula result in the dialog box but not in the cell | Excel Worksheet Functions | |||
Dialog box when closing an unsaved spreadsheet | Excel Discussion (Misc queries) | |||
Closing VB triggers closing Excel | Excel Programming | |||
closing excel after closing a workbook | Excel Programming |