Remove Close button

P

Pete JM

Hi,

Is there a peice of code that will remove or disable the close button
at the top of the excel window?
 
C

chris

Put this code in your wokbook's BeforeClose event, but you will need a condition or else you can't close it at all

Private Sub Workbook_BeforeClose(Cancel As Boolean
Cancel = Tru
End Su


----- Pete JM > wrote: ----

Hi,

Is there a peice of code that will remove or disable the close butto
at the top of the excel window
 
P

Pete JM

Hi, Thanks that is good to know.

The problem is i have a macro assigned to a button that will restor
Excel amoungst other things, then it saves and closes the workbook. I
it possible to only allow this button to close the workbook.

Regards

Pet
 
Top