ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove Close button (https://www.excelbanter.com/excel-programming/295915-remove-close-button.html)

Pete JM[_5_]

Remove Close button
 
Hi,

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


---
Message posted from http://www.ExcelForum.com/


Chris

Remove Close button
 
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


--
Message posted from http://www.ExcelForum.com



Pete JM[_6_]

Remove Close button
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com