View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Disable close unless key held

There are several ways to close Excel, 2 ways with the main Excel icon, the
little-x on the main window, Alt-F4, and File/Exit. Only the latter in
2000-2003 can easily be intercepted. To trap the others would require doing
a lot of stuff that's not practical.

A different approach would be to set the Cancel flag in a workbook-close
event if/as required, post back if that might work for your needs.

Regards,
Peter T

"Chad Cameron" remove NOT wrote in message
...
Hi All,

Is there a way to only enable the close command in excel if the "Shift"
key is held (or any key for that matter) I have a little program that
monitors a computer, but I don't want anyone to close it. (At this time I
am not worried if they kill the process).

Thanks
Chad