Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
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
Clicked NO to save, should have clicked YES Jenn Excel Discussion (Misc queries) 1 March 8th 10 09:04 PM
Get name of clicked Shape Zurn[_60_] Excel Programming 3 July 24th 06 02:55 PM
Change cell value when right-clicked/double-clicked grime[_5_] Excel Programming 5 October 17th 05 01:52 PM
Do until button clicked kaiser Excel Programming 3 August 31st 05 12:41 PM
Is there a way to say which cell is clicked on? Jack Excel Programming 0 August 25th 04 05:11 PM


All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"