Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which x was clicked?
I was wondering if anyone knew a way to tell if the big red X (Excel
app) was clicked as opposed to the little x(workbook). I need to handle each occurance differently. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which x was clicked?
If you mean for a userform, then look at the queryclose event.
If you just mean using Excel events, I am not aware of a direct way to differentiate. Depends on where the code is located and what you want to do, but perhaps a sister workbook is open as hidden or an addin that contains the application level closing code/actions. So when it closes, it knows the application is being closed. -- Regards, Tom Ogilvy "LoDawg" wrote: I was wondering if anyone knew a way to tell if the big red X (Excel app) was clicked as opposed to the little x(workbook). I need to handle each occurance differently. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which x was clicked?
Sorry for the confusion, I am writing a dll that controls excel. I
destroy all excel toolbars and menus and create my own. I encountered a problem when clicking on the little black x that is associated with an individual workbook. It would ask if you wanted to save the workbook and if you selected yes it would save then ask again and repeat this until you selected no or cancel. To handle this I hijacked the before_close event and determine the course of action to take. This works great except that when you select the big x on the red button of the excel window that closes all workbooks and the excel application it only closes the active workbook. Thus, my previous question of how to tell which x was selected so I can handle the need to close the application completely. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clicked NO to save, should have clicked YES | Excel Discussion (Misc queries) | |||
Get name of clicked Shape | Excel Programming | |||
Change cell value when right-clicked/double-clicked | Excel Programming | |||
Do until button clicked | Excel Programming | |||
Is there a way to say which cell is clicked on? | Excel Programming |