disable X in excel to close excel sheet

Hi all,

i have excel sheet in that i have created form control button which save & close the excel.

but few of my user not using the button but using X to close at top right corner close option.

i want my user to using this button so that in one instance they can save and close the excel , i want to disable this X option from excel.

Top Contributor Asked on March 13, 2018 in Excel: General.
Add Comment
1 Answer(s)

Not sure how to get rid or the “X” but here is a workaround. If someone clicks on the “X” the workbook will be saved before it closes.

RE: disable X in excel to  close excel sheet

 

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub
Expert Answered on March 13, 2018.
Add Comment
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.