I have a button on my userform that performs the following
Private Sub btn_exit_Click()
ThisWorkbook.Close True
Application.Quit
End Sub
I want to prevent the user from using the workbook X to close the workbook and force them to use the button.
Everything I have found prevents the X from closing, but then the userform button does not allow closing either.
I want the button to continue to save, close and exit Excel.
Private Sub btn_exit_Click()
ThisWorkbook.Close True
Application.Quit
End Sub
I want to prevent the user from using the workbook X to close the workbook and force them to use the button.
Everything I have found prevents the X from closing, but then the userform button does not allow closing either.
I want the button to continue to save, close and exit Excel.