Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Disable the close button

  Asked By: Harry    Date: Oct 22    Category: MS Office    Views: 1668
  

Is it possible with VBA to disable the close button (X) of the Excel-
Application?
I have found that its possible in Access (see
http://support.microsoft.com/kb/300688), but can't find any similar for
Excel.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Kara Hicks     Answered On: Oct 22

Yes.

You use the Before close  event to trap the attempt to close and set
cancel=true unless the close is from your own close function.

You have to have a flag which is set by your own close function so that the
cancel=true is bypassed..

 
Answer #2    Answered By: Jens Brown     Answered On: Oct 22

Thanks a lot pointing me in the right direction.
I've got it!

 
Didn't find what you were looking for? Find more on Disable the close button Or get search suggestion and latest updates.




Tagged: