Vba Close Worksheet Without Saving. Save a Copy of the Workbook (with Timestamp). I am trying to create a macro for a Button to: exit a worksheet, without saving (it is a Read-only template file), and close Excel. the end users are not comfortable with PC use, so the fewer choices left to them the better.
THIS is the sort of thing that I have decoupled like the way you suggested by saving temp file and mailing that copy and killing it. How to unprotect Excel Worksheet without Password In this video, we will learn the technique of removing Worksheet protection without VBA code or Thirdparty. The Close and Open method in VBA can be used to close and open workbooks.
VBA Examples to Open or Close Workbooks - Open Workbook, Open File Dialog, Close Without Saving, Close and Save w/o prompt, Close all Close First Opened Workbook.
The SaveChanges argument specifies whether changes should be saved.
If you want the code to just close the file without saving the changes - then use If "Application. SaveChanges - to save or not to save changes. Close Else Call Msgbox("changes not saved") End If.